Documentation for CFrame's XVector/YVector/ZVector properties is incorrect

The below diagram and documentation indicate that the XVector, YVector, and ZVector properties correspond to the rows of the CFrame rotation matrix.



However, this is not true: XVector, YVector, and ZVector correspond to the columns of the rotation matrix. In particular, XVector is RightVector, YVector is UpVector, and ZVector is -LookVector. This can be confirmed with the following code, which prints true three times.

local CF = CFrame.Angles(math.random(), math.random(), math.random())
print(CF.XVector == CF.RightVector)
print(CF.YVector == CF.UpVector)
print(CF.ZVector == -CF.LookVector)

Page URL: https://create.roblox.com/docs/reference/engine/datatypes/CFrame

3 Likes

Thanks for the report! We’ve filed a ticket in our internal database.

3 Likes

Thanks so much, AstroCode. I’ve made some updates to the CFrame content to indicate the equivalence of those properties, and with any luck, we’ll investigate a deeper rewrite going forward – the entire page could use some attention.

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