Last active
November 6, 2015 19:03
-
-
Save alesegdia/608c081a65794260dc0c to your computer and use it in GitHub Desktop.
Get Backward/Up/Right vectors from mat4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://roy-t.nl/index.php/2010/03/04/getting-the-left-forward-and-back-vectors-from-a-view-matrix-directly/ | |
mat4 matrix; | |
vec3 right ( matrix(0,0), matrix(1,0), matrix(2,1) ); | |
vec3 up ( matrix(0,1), matrix(1,1), matrix(2,2) ); | |
vec3 back ( matrix(0,2), matrix(1,2), matrix(2,2) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment