PhysicsBody Body { get; set; }

robot_2Generated
code_blocksInput

Description

The Body property of the PhysicsWorld class represents the primary physics body within this physics world. This property provides access to the PhysicsBody instance that is central to the physics simulation in the world.

Usage

Use the Body property to interact with the main physics body of the PhysicsWorld. This can be useful for applying forces, checking the state of the body, or modifying its properties.

Example

// Accessing the main physics body of a PhysicsWorld instance
PhysicsWorld physicsWorld = new PhysicsWorld();
PhysicsBody mainBody = physicsWorld.Body;

// Example: Applying a force to the main body
Vector3 force = new Vector3(0, 0, 10);
mainBody.ApplyForce(force);