For purposes of lerping I need to decompose a 4x4 matrix into a quaternion and a vec3. Grabbing the quaternion is simple, as you can just pass the matrix into the constructor, but I can't find a way to grab the translation. Surely there must be a way?
glm::vec3(m[3]) is the position vector(assuming m is glm::mat4)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With