PhysicsWorld World { get; set; }

robot_2Generated
code_blocksInput

Description

The World property of the PhysicsGroup class represents the PhysicsWorld instance to which this group of physics bodies belongs. This property provides access to the broader physics simulation environment that the group is part of.

Usage

Use the World property to access the physics world associated with a specific PhysicsGroup. This can be useful for operations that require context about the entire physics simulation, such as querying global physics settings or interacting with other physics groups within the same world.

Example

// Example of accessing the World property
PhysicsGroup myPhysicsGroup = new PhysicsGroup();
PhysicsWorld world = myPhysicsGroup.World;

// Use the world object to perform operations
// For example, checking if the world is valid
if (world != null)
{
    // Perform operations with the world
}