todo and veloc fix

This commit is contained in:
ntr committed 2023-08-22 18:09:20 +10:00
1 parent 2bcd14e5ac
commit 6c4ec2fb42
2 files changed
+6 -2

No files matched your search

+4
View File
@@ -78,6 +78,10 @@ public class ShipControls : MonoBehaviour {
// this is relative because it's easy to just multiply by the strafe vector
rigidBody.AddRelativeForce(strafe, forceMode);
// little check to stop the ship bouncing between forward and back when holding decel
if (rigidBody.velocity.magnitude < 0.2)
rigidBody.velocity = Vector3.zero;
// rotating towards the camera's orientation
// not being done by a force because of strange behaviour
// needs investigation