- Home /
Rotating a 3D object relative to it's velocity, but only on a 2D plane
I'm having serious trouble in this situation and I'm hoping someone with a better understanding of quaternions and rotating models in general might be able to help. Essentially, I'm making a 2D game with 3D objects in it, which only move on the 2D plane and should only ever rotate on one axis.
What I'm having a problem with is telling these 3D objects to rotate to an orientation so that they're facing the direction of their velocity (or against it ), and only rotate on the one allowable plane to get there. To make matters worse, the 3D object I'm using as a test object has a different set of axes than Unity2D. The model X axis corresponds to the unity Y axis, Z to -X, and Y to -Z and I'm not sure how to change those or if they can be.
So my question here is, what is the best method to rotate a 3D model so it lines up with it's 2D vector and only rotates on it's own Y axis, at a set speed?
Your answer
Follow this Question
Related Questions
Quaternion.Angle and 360 degrees 1 Answer
Adding Rotation to a Gameobject 1 Answer
ienumerator quaternion only rotating once 1 Answer
[Trackball] Rotation around 2 axis 2 Answers
Downpitch a following camera 0 Answers