I want to animate one of my animation models to turn and look at another object, but I want to do it over a certain amount of time (e.g. - 1 second), instead of using the lookAt() function to do it immediately.
I found these two posts on the subject:
If it’s a reasonable idea, and please tell me if there is a better way, I’m going to use the quarternion rotateTowards() function to achieve this:
The piece I’m missing is how to find the quarternion that is the vector that the animation model should end up pointing towards when the rotation is done, so I can pass it to the rotateTowards() function. How can I calculate that quarternion?
So the rotationMatrix object allows me to execute a lookAt() function without changing anything in my world, and now that I have that value, I can use the rotationMatrix object to get the needed values as a quarternion?
I’ve never used the rotationMatrix object for so I want to make sure I understand the mechanics of this solution.