Matrix multiplication differs in 0.9?

In related news… I just came across a problem with glm::affineInverse(). I discovered that there is a bug in the (old) version of GLM that Cinder 0.9.0 uses (which is GLM 0.9.6.3). The bug occurs when there is non-unity scaling in the matrix, so this might have been part of your problem above. The bug was fixed in GLM 0.9.7.2 (see commit details here). As mentioned by Paul, if that’s what you were seeing, you should get the right result using glm::inverse() instead of glm::affineInverse(), although with a newer version of GLM I think it should work with either (as long as your transforms truly are affine, e.g. no shearing, perspective, etc).

2 Likes