Garry's Mod Wiki

Revision Difference

Structures/PhysicsObjectSave#516894

<cat>struct</cat> {{Structure |Description=Structure used in storing/restoring physics object attributes. <structure> <description> Structure used in storing/restoring physics object attributes. <page>duplicator.GenericDuplicatorFunction</page> and <page>duplicator.DoGenericPhysics</page> use a table of PhysicsObjectSaves with the struct's index in the table being the physics object ID. Pos and Angle are set by the following: ``` Pos, Angle = WorldToLocal(phys:GetPos(), phys:GetAngle(), Vector( 0, 0, 0 ), Angle( 0, 0, 0 )) ``` </description> <fields>{{StructureField|Vector|Pos|The entity's world position made local with <page>Global.WorldToLocal</page></fields> </structure> |Fields= {{StructureField|Vector|Pos|The entity's world position made local with <page>Global.WorldToLocal</page>}} {{StructureField|Angle|Angle|The entity's world angles made local with <page>Global.WorldToLocal</page>}} {{StructureField|boolean|Frozen|Whether the entity is moveable. Equal to (`not` <page>PhysObj:IsMoveable</page>)}} {{StructureField|boolean|NoGrav|Whether the entity's gravity is affected by gravity or not. <page>PhysObj:IsGravityEnabled</page>}} {{StructureField|boolean|Sleep|Whether the entity is dormant or not. <page>PhysObj:IsAsleep</page>}} }}