How would I get the motion of an entity?
I've seen ent:GetPhysicsObject():EnableMotion(true/false), but how do I get if it is frozen/unfrozen? There's no GetMotion, and I'm so confused. I just need a true/false if it's frozen, thanks.
Check its velocity?
No, it can be unfrozen and just lying on the ground.
Frozen with the physgun?
Basically, yea. Any type of frozen, the wiki doesn't have any type of GetFrozen GetMotion GetSleep etc. so yea, frozen like with the physgun
You could try
[lua]
phys:HasGameFlag(FVPHYSICS_CONSTRAINT_STATIC)
[/lua]
Alternatly you can just override :EnableMotion
Hmm, that didn't work either.
Using
[lua]ent:GetPhysicsObject():HasGameFlag(FVPHYSICS_CONSTRAINT_STATIC)[/lua]
I get this:
Tried to use invalid object (type IPhysicsObject) (Object was NULL or not of the right type)
theres IsMoveable i think
[QUOTE=Tobba;22820145]theres IsMoveable i think[/QUOTE]
Your right. [b][url=http://wiki.garrysmod.com/?title=PhysObj.IsMoveable]PhysObj.IsMoveable [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
[QUOTE=jman012;22784265]How would I get the motion of an entity?
I've seen ent:GetPhysicsObject():EnableMotion(true/false), but how do I get if it is frozen/unfrozen? There's no GetMotion, and I'm so confused. I just need a true/false if it's frozen, thanks.[/QUOTE]
If none of those work, read through the code for wire expression 2. It has an E:isFrozen() function.
Sorry, you need to Log In to post a reply to this thread.