Entity.GetPhysicsObject
From GMod Wiki
Function | |
Syntax | Entity:GetPhysicsObject( ) |
Description: | |
Returns the entity's physics object. Only physics entities have physics objects. | |
Returns: | Physobj |
In Object: | Entity |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Entity.GetPhysicsObject]Entity.GetPhysicsObject [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Additional Notes
- Make sure to use Physobj :IsValid on the returned physics object to make sure the entity has a physics object.
- Some entities, like ragdolls and vehicles, have more than one physics object. GetPhysicsObject will only return the first one. Use Entity.GetPhysicsObjectNum to access the others.