What's up, guys.
I switched from euler to quaternions because I needed to slerp some stuff using glm::mix( quat, quat ).
But now I can't come up with a way to rotate the enemy based on the direction that he is moving towards.
There's kind of nothing more to explain. I have a 'glm::vec3 directionVec' that has a certain value. How to use quaternions to rotate the enemy so that his body is rotated towards that directionVec?
For starters, I would just want to rotate it horizontally.
dot product doesn't work on 360 degrees, I need something else. ( I know I can do two dot products using the cross product of the two vectors and make it work for 360, but I don't like this, can you propose something else? )
Thanks for reading, any ideas are appreciated. ^_^