Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualÁlvaro

Posted 08 November 2012 - 03:36 PM

You can extract a signed angle from the size of the cross product: If you started with unit-length vectors, it's just asin(length(rotaxis)).
[EDIT: Please, ignore that.]

You can also avoid using angles at all by computing the quaternion that corresponds to the desired rotation, but applying the 2-degree-per-frame limit is trickier and I don't have time to think about it right now. Maybe I'll post some code tonight.

#1Álvaro

Posted 08 November 2012 - 09:45 AM

You can extract a signed angle from the size of the cross product: If you started with unit-length vectors, it's just asin(length(rotaxis)).

You can also avoid using angles at all by computing the quaternion that corresponds to the desired rotation, but applying the 2-degree-per-frame limit is trickier and I don't have time to think about it right now. Maybe I'll post some code tonight.

PARTNERS