Rotating a forward vector
Hi everyone,
I am still quite new with Unity and I have a question about rotating a vector. Here is the problem: I have a cylinder, rotated 90 degrees about the X axis. I had to record the forward vector of this cylinder while it was being moved and rotated. However, the forward vector recorded is not the one expected, since the cylinder was rotated 90 degrees about X, resulting in a Z axis pointing down and the Y axis pointing forward.
So now I have this "rotated" forward vector, and I am looking for a quick / simple solution to rotate it back.
PS: sorry in advance if this problem has already been resolved but I could not find any related subjects on the forum.
M.
$$anonymous$$ake this Object a child of Other object and then rotate the parent.
Have you tried using Up vector since your up vector is now your forward vector?