Browse Source

Merge branch 'develop' of https://git.joshuareason.com/Jam/GGJ_2021 into develop

feature/RoundManager
MrJDunn 3 years ago
parent
commit
d73d87c216
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      Assets/Scripts/Player Scripts/PlayerInputController.cs

+ 5
- 3
Assets/Scripts/Player Scripts/PlayerInputController.cs View File

@ -47,6 +47,7 @@ public class PlayerInputController : MonoBehaviour
{
ApplyRotation();
ApplyMovement();
LockAxis(Vector3.up);
}
@ -105,7 +106,8 @@ public class PlayerInputController : MonoBehaviour
m_controller.Move(transform.forward * speed * Time.deltaTime);
}
private void LockAxis(Vector3 axis)
{
transform.position = Vector3.ProjectOnPlane(transform.position, axis);
}
}

Loading…
Cancel
Save