Alexey Vanzhula Posted July 31, 2014 Share Posted July 31, 2014 (edited) There is dihedral vex and hscriptExpression functions to calculate rotations. How to rotate for example from (0,-1,0) to (0,1,0), when angle between vectors is 180°. I can parse vangle hscriptExpression function result with if statement, but what is correct decision ? Edited July 31, 2014 by Alexey Vanzhula Quote Link to comment Share on other sites More sharing options...
anim Posted July 31, 2014 Share Posted July 31, 2014 dihedral will compute rotation from {0,-1,0} to {0,1,0} with no problems the only catch is that there is infinite number of possible rotations between opposite vectors as there is no rotation axis strictly defined as in the case when those vectors are not parallel so you need to define perpendicular axis to these vectors to rotate about if you really care about exact rotation so once you have your perpendicular axis you can just use rotaxis() expression function or quaternion(angleaxis) or quaternion(angle, axis) or rotate() VEX functions to get your desired rotation 1 Quote Link to comment Share on other sites More sharing options...
Alexey Vanzhula Posted July 31, 2014 Author Share Posted July 31, 2014 Thank you very much! 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.