Rotation Rotation { get; set; }

robot_2Generated
code_blocksInput

Description

The Rotation property of the GameTransform class represents the rotation of a game object in world coordinates. This property is marked as obsolete, and it is recommended to use WorldRotation instead.

Usage

To access the rotation of a game object in world coordinates, use the WorldRotation property instead of Rotation. The Rotation property is maintained for backward compatibility but is not recommended for use in new code.

Example

// Example of accessing the rotation of a GameTransform
GameTransform transform = new GameTransform();

// Obsolete usage
Rotation rotation = transform.Rotation; // Not recommended

// Recommended usage
Rotation worldRotation = transform.WorldRotation;