So I am making this rocket projectile, and wanted to make the rocket “look” the way it is going. I have alrady calculated the position I need the rocket to look and all this stuff. But when it comes to actually rotating the rocket model, there is one issue.
The issue is that the “front” of the CFrame isnt the same “front” for the actual rocket. Basically it looks like this:
- Red color is the front of the CFrame
- Greenish-blue is the front of the model
You probably see where I am going with this, and now, when I did some searching, I noticed there is an upVector parameter for the LookAt function. Maybe it was just something I missed, but no matter what I set the up vector to, the rocket always faces completely wrong way.
-
When the vector is default (0,1,0), the rocket faces straight down, when (0,-1,0) its straight up.
–Example of 0,1,0:
-
When the vector is default (0,0,1), the rocket faces straight left, when (0,0,-1) its straight right.
–Example of 0,0,1:
So one would be thinking to put the upVector to the X axis, well, nope!
Example of 1,0,0:
Up to this moment, the Y and Z vector made pretty much sense (Y changed it up or down, Z changed it Left or Right) but setting the X as upVector just doesn’t make any sense at all. The rotation with the X as up vector behaves almost as with Z being the up vector.
I also tried mixing several X,Y,Z values together as an upVector, but couldn’t find any combination to come even close to the desired one.
I will really appreciate any advice or help!