|
|
@ -42,6 +42,7 @@ public class PlayerInputController : MonoBehaviour |
|
|
|
{ |
|
|
|
ApplyRotation(); |
|
|
|
ApplyMovement(); |
|
|
|
LockAxis(Vector3.up); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -70,7 +71,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); |
|
|
|
} |
|
|
|
} |