garf Posted April 20, 2018 Share Posted April 20, 2018 I know, I know - it's a daft question but nonetheless..... matrix3 m = maketransform(@N,@up); @orient = quaternion(m); will get you a quaternion value from a vector and an up. How do you reverse that? Quote Link to comment Share on other sites More sharing options...
symek Posted April 20, 2018 Share Posted April 20, 2018 If by reverse you mean how to get original matrix (or N and up): matrix3 m = qconvert(@orient); Quote Link to comment Share on other sites More sharing options...
mestela Posted April 20, 2018 Share Posted April 20, 2018 ...and to finish that thought, now that you have a matrix, you can then take a vector that points along z, and multiply it by the matrix to give you your @N, and a vector that points along x to give you your @up. Example here: http://www.tokeru.com/cgwiki/?title=HoudiniVex#optransform_to_do_a_motion_control_style_camera Quote Link to comment Share on other sites More sharing options...
garf Posted April 23, 2018 Author Share Posted April 23, 2018 nice one - thanks guys Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.