LookVector vs UpVector vs RightVector vs X,Y,Z Vector

I have always ignored Up, Right, X, Y, and Z Vectors because I never really used them. However, I recently came upon these CFrame values when using LookVector and I am really confused about what they all do. After reading up on the developer documentation, I think I have a better understanding of XYZ and LookVector but Up and Right are still really confusing. Could someone dumb down all these terms for me? Thank you!

Also not too sure what a rotation matrix is, and Vector3.new(r00, r01, r02), etc.
I don’t know what category to put this in, sorry.

Say you have a camera. Camera.CFrame.LookVector is the unit vector of what direction the camera is facing. Lets say you wanted the unit vector of the right of the camera. That is what Camera.CFrame.RightVector is. How about if you wanted the direction up relative to where the camera is facing (like pressin E in studio)? That is what Camera.CFrame.UpVector is. This next one is tricky. What about the left (pressing A in studio). That is the negative of Camera.CFrame.RightVector. So, if you wanted to recreate studio camera in a game, these would all be very useful to you. As for the matrixes, I don’t understand nor have I ever had a reason to try to.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.