Fixed smoothed axis continued movement bug

This commit is contained in:
Ava Gaiety Wroten 2020-06-18 16:56:42 -05:00
parent 4f79a38f6f
commit cf69423136

View file

@ -43,6 +43,8 @@ public class Turret : MonoBehaviour
Vector3 getMovementVector()
{
if (chargeCounter.IsLevelWon()) return Vector3.zero;
if (isHorizontal && Input.GetAxisRaw("Horizontal") == 0) return Vector3.zero;
if (!isHorizontal && Input.GetAxisRaw("Vertical") == 0) return Vector3.zero;
float x = isHorizontal ? Input.GetAxis("Horizontal") : 0;
float y = isHorizontal ? 0 : Input.GetAxis("Vertical");