CFrame documentation incorrect on RightVector, UpVector, and LookVector

According to the documentation LookVector is equivalent to Vector3.new(r00, r01, r02), RightVector is equivalent to Vector3.new(r10, r11, r12), and UpVector is equivalent to Vector3.new(r20, r21, r22). This is incorrect, consider the following:

local cf = CFrame.new(1,2,3,4,5,6,7,8,9,10,11,12)
print("RightVector:",cf.RightVector)
--> RightVector: 4, 7, 10
print("UpVector:",cf.UpVector)
--> UpVector: 5, 8, 11
print("LookVector:",cf.LookVector)
--> LookVector: -6, -9, -12
local x,y,z,r00,r01,r02,r10,r11,r12,r20,r21,r22 = cf:GetComponents()
print("x:",x)
--> x: 1
print("y:",y)
--> y: 2
print("z:",z)
--> z: 3
print("r00:",r00)
--> r00: 4
print("r01:",r01)
--> r01: 5
print("r02:",r02)
--> r02: 6
print("r10:",r10)
--> r10: 7
print("r11:",r11)
--> r11: 8
print("r12:",r12)
--> r12: 9
print("r20:",r20)
--> r20: 10
print("r21:",r21)
--> r21: 11
print("r22:",r22)
--> r22: 12

RightVector is equivalent to Vector3.new(r00, r10, r20), UpVector is equivalent to Vector3.new(r01, r11, r21), and LookVector is equivalent to Vector3.new(-r02, -r12, -r22).

6 Likes

Just wanted to add that this page also contains a lot of miss types which should be considered.

1 Like

Thanks for this correction, this page recently got a face-lift. Some inaccuracies regarding the rotation matrix and vector properties had been introduced in the process, but I’ve just fixed those now. I’ve also made the matrix table a little more useful.

Should be visible soon as web caches are cleared.

2 Likes

Update, 8 hours later and there’s still a caching issue with the page. I’ll have to poke the web engineer about it tomorrow.