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

31 lines
629 B
Markdown
Raw Normal View History

# SetLocalEulerAngles
Set the local rotation using Euler angles in degrees.
## Syntax
```cpp
void SetLocalEulerAngles(const Math::Vector3& eulers);
```
## Parameters
- `eulers` - The Euler angles `(x, y, z)` in degrees.
## Remarks
Sets the local rotation by converting the Euler angles to a quaternion. The angles represent rotation around the X, Y, and Z axes respectively.
## See Also
- [GetLocalEulerAngles](get-local-euler-angles)
- [SetLocalRotation](set-local-rotation)
## Examples
```cpp
void Example(TransformComponent* transform) {
transform->SetLocalEulerAngles(Math::Vector3(45.0f, 90.0f, 0.0f));
}
```