From 56ed2a4e8962a105a0ae888e5b75e07c6b0385ad Mon Sep 17 00:00:00 2001 From: ntr Date: Tue, 22 Aug 2023 18:09:20 +1000 Subject: [PATCH] todo and veloc fix --- Assets/Src/ShipControls.cs | 4 ++++ TODO.md | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Assets/Src/ShipControls.cs b/Assets/Src/ShipControls.cs index 9b77272..96b3bef 100755 --- a/Assets/Src/ShipControls.cs +++ b/Assets/Src/ShipControls.cs @@ -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 diff --git a/TODO.md b/TODO.md index ebc67f7..055b6db 100644 --- a/TODO.md +++ b/TODO.md @@ -1,12 +1,12 @@ # SpaceRace! - controls UI - - boost charge coloring chevron things - - shield icon - output boost indicators - controls diagram +- shield regen bug + - git lfs - post times to server