+1 vote

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.

in Engine by (1,051 points)

1 Answer

0 votes

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.

by (1,051 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.