Files
XCEngine/docs/api/components/transform-component/get-local-euler-angles.md

32 lines
696 B
Markdown
Raw Normal View History

# GetLocalEulerAngles
Get the local rotation as Euler angles in degrees.
## Syntax
```cpp
Math::Vector3 GetLocalEulerAngles() const;
```
## Returns
Returns the local rotation as Euler angles `(x, y, z)` in degrees.
## Remarks
Converts the local quaternion rotation to Euler angles representation. The angles represent rotation around the X, Y, and Z axes respectively.
## See Also
- [SetLocalEulerAngles](set-local-euler-angles)
- [GetLocalRotation](get-local-rotation)
## Examples
```cpp
void Example(TransformComponent* transform) {
Math::Vector3 eulers = transform->GetLocalEulerAngles();
XC_LOG_INFO("Local euler angles: ({}, {}, {})", eulers.x, eulers.y, eulers.z);
}
```