RE: [Algorithms] Oriention from Normal
Brought to you by:
vexxed72
From: Chris B. (BUNGIE) <cbu...@mi...> - 2002-02-28 01:58:35
|
> -----Original Message----- > From: Ratcliff, John [mailto:jra...@so...] > Sent: Wednesday, February 27, 2002 16:18 > To: Chris Butcher (BUNGIE); gda...@li... > Subject: RE: [Algorithms] Oriention from Normal >=20 > Hmmmm..how about just doing this? At least that's why our new AI guy, = Scott > Martin, added to our math libraries today: >=20 > euler.x =3D 0; // roll > euler.y =3D acosf(normal.z); // pitch > euler.z =3D atanf(normal.y, normal.x); // yaw >=20 > ??? >=20 > If you are going to be working in euler co-ordinates as a generalized > representation that is. And going from euler to quat is easy enough. >=20 Sure, that works, although it's almost certainly slower. Be very wary = of slightly-out-of-range values in normal.z if you're passing it to = acosf directly. -- Chris Butcher AI Engineer | Halo Bungie Studios bu...@bu... |