Dcumentation bugs Mat4

some small problems on the Mat4 documentation:

Mat4 | PlayCanvas API Reference as well as
Mat4 | PlayCanvas API Reference
should state that they only yield correct results if the matrix represents an affine transformation and that for general matrices Mat4 | PlayCanvas API Reference should be used (alternatively, the implementation of transformPoint and transformVector should be fixed to calculate and divide by w component)

Mat4 | PlayCanvas API Reference should probably state that the data layout is column-major (or at least that all the convenience functions assume column-major layout)

https://developer.playcanvas.com/en/api/pc.Mat4.html#mulAffine2
here the description is incorrect
β€œβ€¦, and the bottom left 3 elements are translation. The rightmost column is assumed to be [0, 0, 0, 1]” should instead read β€œβ€¦, and the top right 3 elements are translation. The bottommost row is assumed to be [0, 0, 0, 1]”

1 Like

Many thanks @mabu!

Care to add an issue or even better a PR on the docs repo? It’s open source and very much welcomes all contributions.

1 Like