diff --git a/Assets/Src/ShipControls.cs b/Assets/Src/ShipControls.cs index 3e33810..e844565 100755 --- a/Assets/Src/ShipControls.cs +++ b/Assets/Src/ShipControls.cs @@ -69,11 +69,12 @@ public class ShipControls : MonoBehaviour, SpaceRaceInput.IShipActions { input.ship.RemoveCallbacks(this); } - void Update() { // to minimise input lag we poll for the thrust vector every frame and set it thrust = getThrust(); + // if (rigidBody.velocity.magnitude < 0.5f) rigidBody.velocity = Vector3.zero; + // same with the camera, we always look around UpdateCamera(); } @@ -97,7 +98,10 @@ public class ShipControls : MonoBehaviour, SpaceRaceInput.IShipActions { // not being done by a force because of strange behaviour // needs investigation float step = stabliseMag * Time.fixedDeltaTime; - rigidBody.rotation = Quaternion.RotateTowards(transform.rotation, aim.transform.rotation, step); + + // stop the ship jiggling because of micro camera movement + if (Quaternion.Angle(aim.transform.rotation, rigidBody.rotation) > 1f) + rigidBody.rotation = Quaternion.RotateTowards(transform.rotation, aim.transform.rotation, step); } void UpdateCamera() {