Fixed smoothed axis continued movement bug
This commit is contained in:
parent
4f79a38f6f
commit
cf69423136
1 changed files with 2 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Reference in a new issue