Rotation Identity

book_4_sparkGenerated
code_blocksInput

Description

The Rotation.Identity field is a static, public field of the Rotation struct. It represents a rotation that signifies no rotation, effectively serving as the default or neutral rotation state. This is equivalent to a quaternion with no rotation applied, often used as a starting point or reference in rotation calculations.

Usage

Use Rotation.Identity when you need a rotation that represents no change in orientation. This is particularly useful when initializing objects or resetting rotations to a default state.

Example

// Example of using Rotation.Identity
Rotation defaultRotation = Rotation.Identity;

// Check if a rotation is the identity rotation
bool isDefault = someRotation == Rotation.Identity;

// Use identity rotation to reset an object's orientation
GameObject myObject = new GameObject();
myObject.Rotation = Rotation.Identity;