I’m trying to get enemy ships to turn toward the player’s ship (and likewise for gun turrets), but the resulting angle is always “snapped” to the nearest cardinal angle - 0, 90, 270 - even though I’m using the same method given in the manual itself and used by other people in the forums. Here’s my code.
//calc direction between ship and player
var dir:Vector3 = PlayerPos - ShipPos;
// get rotation the ship needs to swivel toward
var FinalRotation:Quaternion = Quaternion.LookRotation(dir.normalized);