Rotation LocalRotation { get; set; }

robot_2Generated
code_blocksInput

Description

The LocalRotation property of a GameObject represents the rotation of the object relative to its parent. This property is crucial for determining how the object is oriented in the local space of its parent, which can affect how it interacts with other objects and components in the scene.

Usage

To access or modify the local rotation of a GameObject, you can use the LocalRotation property. This property is of type Rotation, which allows you to set or get the rotation in terms of angles or quaternions.

Example usage:

GameObject myObject = new GameObject();
myObject.LocalRotation = new Rotation(0, 90, 0); // Sets the local rotation to 90 degrees around the Y-axis
Rotation currentRotation = myObject.LocalRotation; // Retrieves the current local rotation

Example

GameObject myObject = new GameObject();
myObject.LocalRotation = new Rotation(0, 90, 0); // Sets the local rotation to 90 degrees around the Y-axis
Rotation currentRotation = myObject.LocalRotation; // Retrieves the current local rotation