# Rotation

## Setter

setRotation is the only function to set the rotation of your GameObject. This function gonna set the local rotation.

```cpp
gameObject.getComponent<KapEngine::Transform>().setRotation({10, 10, 10}); // OK
gameObject.getComponent<KapEngine::Transform>().setRotation({10, 10}); // OK : z gonna be set to 0
```

## Getter

There is 2 types of getters :&#x20;

* Local : getLocalRotation is to get only the rotation in parent of GameObject
* World : getWorldRotation is to get rotation of GameObject relative to parent rotations

both of these functions return [KapEngine::Tools::Vector3](https://kap35.gitbook.io/kap-engine-wiki/user-manual/tools/vectors).

{% hint style="info" %}
calculs with parent are additions
{% endhint %}
