Is FMatrix 4x3? Where's the 4x4 matrix?

So I was trying to do some matrix math today in Unreal and noticed that in the docs it states that FMatrix is 4x4, but the constructor overloads only work with FVector (and not FVector4)?! So what kind of matrix type has four rows of vector3’s?! Seriously I want to know what the use of it is.

What’s the UE4 way of making a 4x4 matrix? Should I just say screw it and use my own float[4][4]?

PS: I want a UE struct for a float4x4 that I can send to a shader via DECLARE_UNIFORM_BUFFER_STRUCT_MEMBER

There’s a constructor
FMatrix::FMatrix(const FPlane& InX,const FPlane& InY,const FPlane& InZ,const FPlane& InW)
FPlane is nearly the same as FVector4, and there’s a constructor which builds FPlane from FVector4 etc.

Thanks! I can confirm that FMatrix set this way to 4x4, works when sent to a hlsl shader via DECLARE_UNIFORM_BUFFER_STRUCT_MEMBER().
Really strange that the same matrix data struct has weirdly specific different sizes. And this whole FMatrix and FPlane vs FVector4 is just bad programming UX. :stuck_out_tongue:

I think the reason FMatrix wants four FVector3’s is because you use them to build a matrix transform. IE: first column is vector i of the transform, second column j, third k, and then the fourth column would be the translation. Since FVector3’s got fed into the columns, the 4x4 matrice’s last row will be blank, because it’s not needed for representing a transformation.

Take that with a grain of salt though. Haven’t tested it yet myself.