Original Post
hi
i''m using slerps to do homing missiles and turning gun turrets etc, and it''s working smashingly well except for two details. i''m using D3DX functions for matrices and quaternions, and the method consists of these steps:
1. create a lefthanded lookat-matrix involving the missile and the target - and get it''s transpose.
2. convert this matrix into a quaternion.
3. convert the orientation/rotation matrix for the missile to a quaternion.
4. perform a slerp making the direction of the missile to turn towards the target.
the two problems i have ar the following:
1. in some positions the result of the slerp makes the missile kind of twitch and act strangely, and i suspect this has to do with the up-vector i use whencreating the lookat matrix. what vector should i use?
2. the slerp function in directx works with three parameters: two quaternions and a scalar telling the slerp how much of the interpolation to perform on a scale of 0.0f to 1.0f. my problem is that i want the speed of the interpolation to be absolute, not relative, i.e. i want it to turn a specific ammount of degrees per second. how do i do that?
thanks for your time / tamlin