Rotation Rotation { get; set; }

robot_2Generated
code_blocksInput

Description

The Rotation property of the PhysicsBody class represents the rotation of the physics body in world space. This property allows you to get or set the orientation of the physics body, which is crucial for determining how the body is oriented in the 3D world.

Usage

Use the Rotation property to manipulate or retrieve the current orientation of a PhysicsBody instance. This can be useful for aligning objects, setting initial orientations, or responding to changes in the physics simulation.

Example

// Example of setting the rotation of a PhysicsBody
PhysicsBody body = new PhysicsBody();
body.Rotation = new Rotation(0, 90, 0); // Set the rotation to 90 degrees around the Y-axis

// Example of getting the rotation of a PhysicsBody
Rotation currentRotation = body.Rotation;
// Use currentRotation to perform further operations