# Rotation not working correctly with movement

**URL:** <https://forum.babylonjs.com/t/rotation-not-working-correctly-with-movement/22756>\
**Category:** Questions\
**Created:** [August 2, 2021, 5:33am UTC](https://forum.babylonjs.com/t/rotation-not-working-correctly-with-movement/22756 "2021-08-02T05:33:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zudnik](https://avatars.discourse-cdn.com/v4/letter/z/a5b964/32.png) [@zudnik](https://forum.babylonjs.com/u/zudnik)\
**Post date:** [August 2, 2021, 5:33am UTC](https://forum.babylonjs.com/t/rotation-not-working-correctly-with-movement/22756/1 "2021-08-02T05:33:31Z")

</div>

Hi there,

Im trying to figure out what I need to do here, when I rotate the mesh the movement is going out of whack, very noticable when you bank to 90 degrees and try to pitch and change heading, I know I need to translate this somehow to relative rotation but Im not sure how to go about it, perhaps yall can help.

[Floating Blue box | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#P7P8I3#3)

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [August 2, 2021, 7:11am UTC](https://forum.babylonjs.com/t/rotation-not-working-correctly-with-movement/22756/2 "2021-08-02T07:11:46Z")

</div>

Hi @zudnik

I’m not sure to understand what you want to do. If you want to change the orientation of the cube a make it follow the direction, maybe you want to keep the Y up. In that camera, I would use [Quaternion | Babylon.js Documentation](https://doc.babylonjs.com/typedoc/classes/babylon.quaternion#fromlookdirectionlh) as a second step to align the cube up vector to the world up vector.
