This repository was archived by the owner on Aug 14, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
PlayerMovementController.cs
Erik edited this page Apr 22, 2019
·
1 revision
- Rigidbody2D
- "Horizontal" input axis configured
- A "Ground" layer created and assigned to any objects that the player can jump from.
- None
- None
- horizontalSpeed - The maximum horizontal speed (in units per second) that the player can reach via player input.
- horizontalAxis - The Input Axis' name.
- jumpForce - The continuous force added to the player to jump. Affected by the player Rigidbody2D's mass.
The controller gradually speeds the player up in whatever direction is pressed until maximum speed is reached. Jumping grants a one-tick upward force that stacks additively onto the player's velocity (if the player is falling, the jump will reduce downward velocity but may not actually push the player upward. If the player is already moving upward, the jump will increase vertical velocity).
Script Documentation
General Scripts
Generic Character Scripts
Enemy Scripts
Player Scripts
Erik's ongoing laundry list of TODOs that he doesn't want to create issues for