Used the new Input System(2022) from Unity to implement player controls in the game.
Jump: A ground layer was required to make sure only single jump takes place, also jumping force is double if the jump key(spacebar) is held for longer.
Running: Used the horizontal value from InputAction to get the direction of motion and used it to establish running.
Jump Force is set to 5f.
Speed of motion of player is set to 8f.
Overview
Used the new Input System(2022) from Unity to implement player controls in the game.
Jump: A ground layer was required to make sure only single jump takes place, also jumping force is double if the jump key(spacebar) is held for longer.
Running: Used the horizontal value from InputAction to get the direction of motion and used it to establish running.
Jump Force is set to 5f. Speed of motion of player is set to 8f.
Proof that changes are correct:
https://github.com/bsoc-bitbyte/2D-Platformer/assets/126911424/e1b4f0f6-5482-4433-801b-35e4e4898b0e