From eed9259efe8896b4f6645c6fbabdd7a2b115f546 Mon Sep 17 00:00:00 2001 From: MrGadget <9826063+MrGadget1024@users.noreply.github.com> Date: Wed, 18 Sep 2024 19:39:40 -0400 Subject: [PATCH] fix(TankControllerBase): Reset move / turn speeds OnDisable --- .../Controllers/TankController/TankControllerBase.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerBase.cs b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerBase.cs index 0ce3c3590..2c9a7a261 100644 --- a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerBase.cs +++ b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerBase.cs @@ -162,6 +162,13 @@ protected virtual void Reset() this.enabled = false; } + void OnDisable() + { + horizontal = 0f; + vertical = 0f; + turnSpeed = 0f; + } + public override void OnStartAuthority() { // capsuleCollider and characterController are mutually exclusive