What is the easiest way to zero out the translation component of a glm::mat4…
Thanks for any advice
What is the easiest way to zero out the translation component of a glm::mat4…
Thanks for any advice
It’s the fourth column.
Thanks Alfonse
So should this work:
glm::mat4 no_translation = view_matrix;
no_translation[3].x=0;
no_translation[3].y=0;
no_translation[3].z=0;
no_translation[3].w=0;
Actually:
no_translation[3] = glm::vec4(0, 0, 0, 1);
Or using the component names if you want.