Is there a way to script an aiming function with vec_to_angle, so that when the tilt angle of the aiming object reaches the 90 and 270 degrees, that it doesn't flip?

I have an object thats aiming at a target and when the target's position is immediatly over the aiming object's position, the aiming object will spin. It will still successfully aim at the object, but it looks like its rolling. The closest thing I know how to call this effect is a Pole Vector if any of you used Maya. The pole vector was an imaginary line that if crossed, would spin the aiming object around its up axis. So it seems an object's pole vector in maya is it's z axis.

I'm not sure if this is gimbal lock or something, because Ive never run into the problem and gimbal lock search results have given me flight simulator rotations(adding rotation to already rotated objects if I'm correct). I think this effect is restricting the rotation values, or exceeding values, not sure how to call it.

Another example would be as if you were a floating head. A plane comes and flies under you while you are tracking it. It flies under and behind you, and now your head is upside down, while you are still tracking the plane.

If I didnt explain it right, tell me, I can post a picture.

Last edited by jumpman; 11/08/07 03:30.