class PhysicsGroup

book_4_sparkGenerated
code_blocksInput

Description

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.

Members

Instance Methods

Member NameSummary
AddVelocityAdds a velocity to the physics group.
AddAngularVelocityAdds an angular velocity to the physics group.
ApplyImpulseApplies an impulse to the physics group, optionally considering mass.
ApplyAngularImpulseApplies an angular impulse to the physics group, optionally considering mass.
RebuildMassRebuilds the mass of all bodies in the group.
GetBodyRetrieves a physics body by index or name from the group.
SetSurfaceSets the surface type for the physics group.
RemoveDeletes the group and all its bodies.

Instance Properties

Member NameSummary
WorldThe world to which this group belongs.
PosPosition of the first physics body in the group, or zero if none.
MassCenterCenter of mass for the group.
VelocityVelocity applied to all bodies in the group.
AngularVelocityAngular velocity applied to all bodies in the group.
SleepingIndicates if the physics bodies are sleeping to save performance.
MassTotal mass of all dynamic bodies in the group.
LinearDampingLinear damping applied to all bodies in the group.
AngularDampingAngular damping applied to all bodies in the group.
BodiesAll physics bodies in the group.
BodyCountNumber of physics bodies in the group.
JointsJoints attached to any body in the group.