Corrupted Castle
Code Snips - Lateral Movement
Code Snips - Lateral Movement
Player Dash - Handles input and makes the player dash in the direction the joystick/WASD keys are pointing relative to the camera.
Player Walk - Handles input and moves the player in the player in the intended direction using acceleration, decceleration and an animation curve. This applies the force in the player's forward direction, and the component below handles rotating the player in the direction they intend to move towards.
Player Rotate - Handles input and rotates the player based on the player's intended direction and rotation speed is adjusted based on how fast the player is walking by evaluating the player's normalized walking speed on an animation curve.
(Slower walking speed = faster rotation, faster walking speed = slower rotation)