Garry's Mod Wiki

PhysicsObjectSave

Description

Structure used in storing/restoring physics object attributes. duplicator.GenericDuplicatorFunction and duplicator.DoGenericPhysics 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 ))

Members

Vector Pos
The entity's world position made local with WorldToLocal
Angle Angle
The entity's world angles made local with WorldToLocal
boolean Frozen
Whether the entity is moveable. Equal to (not PhysObj:IsMoveable)
boolean NoGrav
Whether the entity's gravity is affected by gravity or not. PhysObj:IsGravityEnabled
boolean Sleep
Whether the entity is dormant or not. PhysObj:IsAsleep