The CFrame page needs some matrix documentation

It doesn’t state whether it’s Column or Row vectors, and it doesn’t state left or right hand… It’d help a lot if there was documented an image of how the component numbers are placed in the vectors of a CFrame.

Currently I have been assuming it was column vectors, like so:
(0, 0, 0,
X.X, Y.X, Z.X,
X.Y, Y.Y, Z.Y,
X.Z, Y.Z, Z.Z)

But I’ve gotten some weird results when forming matrices before, so I have no idea what’s up, and it only makes it worse that lookVector is negative, and tool grip CFrames are completely weirdly made. Clarification wanted, and while I can figure it out by printing components of slightly rotated CFrames, it’s a waste of time to do so if I forget it’s orientation (I work with other 3D systems than just Roblox very often, and it’s too easy to get them mixed)

It does?



Typically you shouldn’t need to directly manipulate the matrix.
@AxisAngle is your guy if you need information about them.

Translation should be in the bottom row.

I was writing my line as what I assumed the constructor looked like… @Maximum_ADHD I work with matrices all the time, and it’s very often that I need to make one from components. @digpoe Trying to make sense of the tool grip, and why it has a negative GripForward is rather odd, so does that mean that all CFrames in Roblox naturally face backwards? Or does that mean that tool grips have a negative Z vector. Howabout Roblox just uses standard terms, “Right hand matrix, column vectors,X right, Y up, Z back” Is it all that hard to use standard terminology, because understanding that mess while tired is impossible.

To just read the wiki, after thinking it through this morning I came up with this:


If it’s correct, someone please post it on the wiki, or at least the description “Right hand matrix, column vectors,X right, Y up, Z back”

1 Like

In ROBLOX, CFrames are constructed using the position, up, right and back vectors - It’s just a weird thing with the API which has GripForward instead of GripBack.

I have difficulty following the CFrame descriptions and getting a good image in my mind of what’s being described. I would benefit immensely from illustrations and working examples for everything CFrame related. Most of what I understand is what I’ve been able to copy and play with.

you shut’chur mouf

The amount of control you can have by setting each component is amazing. There are things that no other kind of CFrame manipulation can do, such as creating local frames from two vectors, and you can have very precice control on rounding errors if you are, say, generating bricks.

Should be, but it isn’t with the CFrame constructor in Lua. :stuck_out_tongue:

1 Like

This is a really handy image.
I think I’ll put it on the wiki, if you don’t mind.

2 Likes

Pleeeaseeeee… If it’s correct (which I’m still not 100% on, someone at Roblox needs to confirm)