
[ad_1]
When working with rotations expressed as angles, it is sensible to have the ability do to one thing like
void GameLoop::replace(){
pawn.rotation.x += 0.01;
}
And slowly watch the mannequin rotate. However after I tried to do the identical factor with a Quaternion based mostly rotation, I noticed that the rotation didn’t behave as anticipated. For context I’m utilizing GLM’s Quaternion implementation. What is the most effective identified methodology for updating and interacting with Quaternions? ought to I convert the Quat again to Euler angles, do the replace after which retailer the up to date worth, or is there a Quat analog to += 0.01
that’s thought of customary? Am I incorrect for storing a mannequin’s rotation as a Quaternion within the first place?
[ad_2]