PhysicsGroup Group { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Group property of the PhysicsWorld class represents the physics group associated with this physics world. A physics world is designed to contain only one body, and this property provides access to that group.

Usage

Use the Group property to access the physics group of a PhysicsWorld instance. This can be useful for managing and interacting with the physics entities within the world.

Example

// Example of accessing the Group property of a PhysicsWorld
PhysicsWorld physicsWorld = new PhysicsWorld();
PhysicsGroup physicsGroup = physicsWorld.Group;

// Use the physicsGroup for further operations
// For example, you might want to iterate over bodies in the group
foreach (var body in physicsGroup.Bodies)
{
    // Perform operations on each body
}