Topic was automatically imported from the old Question2Answer platform.
Asked By
magicalogic
How do you rotate a quaternion.
I know how to get a Quat from a basis and change it back to a basis but I want to rotate it first before changing it to a basis. Any help regarding godot’s Quat usage is welcome too.
Am trying to avoid gimbal lock.
So I finally figured it out and thought that maybe I should answer my own question and hopefully help someone with the same problem.
Turns out its pretty simple actually. After getting a quaternion from the basis of your object , you just create another quaternion representing another rotation and multiply it with your first quaternion then change it to a basis and assign it back to your object.