-
Notifications
You must be signed in to change notification settings - Fork 0
Unity: Movement System
This page is under active development. Refer back later for more details.
Double click Assets/Scripts/Input/PlayerInput to get the action mapping window
Our inputs are currently in InputManager.cs, which contains a few settings and the inputs we determined from the design meeting. It is a singleton, which allow sother scripts to easily access it. Use GetMovement/GetJump/GetCrouch methods on the Player game object.
Character Controller is a Unity-handled movement system, allows options like gravity, speed, etc.
Update should handle player actions, FixedUpdate handles physics events and is better for most things.
Player is allowed to jump if a sphere drawn at their feet collides with the ground.
InputManager has a toggleCrouch which changes behavior to a toggle instead of holding it down. There is also a crouchScale that determines how low crouching goes. In the future, we may decrease movement speed while crouching.