I can’t believe I’ve never come across this before, but I’ve looked all through the wiki and can’t find it listed anywhere: how do you tell whether an entity/physobject has gravity enabled or not?
I found this pretty quickly - returns the entity’s fraction of normal gravity. Does it not give you the expected output?
But if you’re looking for a get equivalent of physobj.EnableGravity, I can’t see one like that either. No idea if physobj.EnableGravity and entity.GetGravity are compatible.
No, unfortunately Entity.GetGravity only works on players as far as I can tell… or at least, it can’t seem to detect whether EnableGravity() is on or off. I’m finding it hard to believe there isn’t a corresponding get function for physobj.EnableGravity. Does it really not exist?
Well, what exactly are you planning to do? Shut gravity off for an ent? if so tear apart some entities that I’m sure some people have made and find that.
Apparently there is a function to do this: PhysObj:IsGravityEnabled(). It just wasn’t documented anywhere.