[Flashcoders] Euler angles...

2006-09-01 Thread Seb L
... any crazy geniuses out there know how to generate euler angles for a 3D vector? Or i guess to calculate the rotation angles between 2 3D vectors? Any pointers would be greatly appreciated. I am losing it now... :-) cheers! Seb ___

Re: [Flashcoders] Euler angles...

2006-09-01 Thread Alias™
What are you trying to do? Do you want to tween from one 3d position/rotation to another? How are you representing your objects? Alias On 01/09/06, Seb L [EMAIL PROTECTED] wrote: ... any crazy geniuses out there know how to generate euler angles for a 3D vector? Or i guess to calculate the

Re: [Flashcoders] Euler angles...

2006-09-01 Thread Seb L
I have a simulated cable in 3D, and all I have a 3D plug attached to the end of the cable. My 3D plug object stores its rotation as 3 euler angles. I need to work out what those angles should be so that they point in the same direction as the end of the cable. I have the cable direction as a 3D

Re: [Flashcoders] Euler angles...

2006-09-01 Thread Mark Winterhalder
Hi, it's been a while, but IIRC the cross product of the two normalized vectors will give you the rotation vector, and the acos of the dot product is the rotation angle. Convert that into a quaternion (much, much easier than it sounds), that quaternion into a rotation matrix, and extract the

Re: [Flashcoders] Euler angles...

2006-09-01 Thread Seb L
That is indeed an amazing resource. Thank you so much! Seb On 01/09/06, Mark Winterhalder [EMAIL PROTECTED] wrote: Hi, it's been a while, but IIRC the cross product of the two normalized vectors will give you the rotation vector, and the acos of the dot product is the rotation angle. Convert