-
[glm] Best way to zero out translation component
What is the easiest way to zero out the translation component of a glm::mat4....
Thanks for any advice
-
Senior Member
OpenGL Guru
Re: [glm] Best way to zero out translation component
-
Re: [glm] Best way to zero out translation component
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;
-
Super Moderator
Frequent Contributor
Re: [glm] Best way to zero out translation component
Actually:
no_translation[3] = glm::vec4(0, 0, 0, 1);
Or using the component names if you want.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules