|
|
@ -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); |
|
|
|
} |
|
|
|
} |