Description
The PhysicsGroup
property of a PhysicsBody
represents the physics group to which the body belongs. This property is useful for organizing and managing multiple physics bodies that should be treated as a single unit in terms of physics interactions.
Usage
Use the PhysicsGroup
property to get or set the physics group of a PhysicsBody
. This can be useful when you want to apply operations or queries to all bodies within the same group.
Example
// Example of accessing the PhysicsGroup property
PhysicsBody body = new PhysicsBody();
PhysicsGroup group = body.PhysicsGroup;
// Example of setting the PhysicsGroup property
PhysicsGroup newGroup = new PhysicsGroup();
body.PhysicsGroup = newGroup;