PlatformerBody2D 1.1 Scripts 3.3 Community
Submitted by user drumstickz64; MIT; 2021-10-21
# Base PlatformerBody2D for Godot
A simple base platformer body 2D with acceleration, deceleration, jumping, and jump-cutting. acceleration and jump trajectories calculated using simple time and max-distance/max-speed values exported to the editor.
## Functions
- **Move:** Move the character.
- **Jump:** perform a jump.
- **cut_jump:** cut the jump short.
- **apply_gravity:** apply gravity.
- **get_gravity:** allows for adding different types of gravity.
- **should_accelerate:** should the character accelerate
- **apply_acceleration** accelerate in a given direction.
- **get_acceleration:** allows for adding different types of acceleration.
- **should_decelerate:** should the character decelerate
- **apply_deceleration:** slowly decelerate.
- **get_deceleration:** allows for adding different types of deceleration.
## Properties
- **up_direction**
- **down_direction**
View files Download Submit an issue Recent Edits