Rotation LocalRotation

robot_2Generated
code_blocksInput

Description

The LocalRotation field represents the rotation offset from the position of the physics body to which this PhysicsPoint is attached. It is used to define the orientation of the point relative to the body, allowing for precise control over how the point is rotated in relation to the body.

Usage

To use the LocalRotation field, you can directly access it from an instance of PhysicsPoint. This field is public and non-static, meaning it is specific to each instance of PhysicsPoint. You can set or get the rotation offset to adjust how the point is oriented relative to the physics body.

Example

// Example of setting the LocalRotation for a PhysicsPoint
PhysicsBody myBody = new PhysicsBody();
PhysicsPoint myPoint = new PhysicsPoint();

// Set the local rotation to a specific rotation
myPoint.LocalRotation = new Rotation(0, 90, 0); // Rotates the point 90 degrees around the Y-axis

// Access the local rotation
Rotation currentRotation = myPoint.LocalRotation;

// Use the local rotation in a physics simulation or for visual representation
// For example, applying the rotation to a visual model attached to the physics point