Format
typescript
Transform.eulerAnglesclass: Transform
Description
(Read Only) The rotation of the game object as Euler angles in degrees.
This method returns the rotation of the game object in world space as Euler angles. When viewed in the inspector panel, the returned value may be different from the rotation value displayed in the inspector panel. This is because the inspector panel displays the local rotation. For more information, please refer to Transform.localEulerAngles.
Parameters
| param_name | type | description |
|---|
Return
| type | description |
|---|---|
Vector3 | The rotation of the game object as Euler angles in degrees. |
Code Example
typescript
OnStart(): void {
let angle = this.transform.eulerAngles;
Debug.Log(angle);
}