The PhysicsGroup class in the Sandbox namespace represents a collection of PhysicsBody objects, similar to a ragdoll. It provides methods and properties to manipulate and query the physics bodies within the group.
The PhysicsGroup class in the Sandbox namespace represents a collection of PhysicsBody objects, similar to a ragdoll. It provides methods and properties to manipulate and query the physics bodies within the group.
Member Name | Summary |
---|---|
AddVelocity | Adds a velocity to the physics group. |
AddAngularVelocity | Adds an angular velocity to the physics group. |
ApplyImpulse | Applies an impulse to the physics group, optionally considering mass. |
ApplyAngularImpulse | Applies an angular impulse to the physics group, optionally considering mass. |
RebuildMass | Rebuilds the mass of all bodies in the group. |
GetBody | Retrieves a physics body by index or name from the group. |
SetSurface | Sets the surface type for the physics group. |
Remove | Deletes the group and all its bodies. |
Member Name | Summary |
---|---|
World | The world to which this group belongs. |
Pos | Position of the first physics body in the group, or zero if none. |
MassCenter | Center of mass for the group. |
Velocity | Velocity applied to all bodies in the group. |
AngularVelocity | Angular velocity applied to all bodies in the group. |
Sleeping | Indicates if the physics bodies are sleeping to save performance. |
Mass | Total mass of all dynamic bodies in the group. |
LinearDamping | Linear damping applied to all bodies in the group. |
AngularDamping | Angular damping applied to all bodies in the group. |
Bodies | All physics bodies in the group. |
BodyCount | Number of physics bodies in the group. |
Joints | Joints attached to any body in the group. |