Rotation InertiaRotation { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The InertiaRotation property of the PhysicsBody class represents the orientation of the principal axes of the inertia tensor matrix. This property is crucial for understanding how the physics body will rotate under applied torques, as it defines the body's resistance to angular acceleration around each principal axis.

Usage

Use the InertiaRotation property to get or set the orientation of the inertia tensor's principal axes for a physics body. This can be particularly useful when you need to adjust the rotational dynamics of a physics body in a simulation.

Example

// Example of accessing the InertiaRotation property
PhysicsBody physicsBody = new PhysicsBody();
Rotation inertiaRotation = physicsBody.InertiaRotation;

// Set a new inertia rotation
physicsBody.InertiaRotation = new Rotation(0, 90, 0);