<commit_before># Unity 2D Platformer Controller
=======================

<!---%=description%-->

A customizable 2D platformer motor that interacts with Unity's physics engine to do mechanics such as double jumps, wall jumps, and corner grabs. Includes a player controlled prefab that can be dropped into any scene for immediate support.

<!---%=obtain%-->

####Obtain!####
[Releases](https://github.com/cjddmut/Unity-2D-Platformer-Controller/releases)

If you'd like the most up to date version (which is the most cool), then pull the repo or download it [here](https://github.com/cjddmut/Unity-2D-Platformer-Controller/archive/develop.zip) and copy the files in Assets to your project's Assets folder.

<!---%=docrest%-->

## Setup

For immediate player support, drop the PlatformerPlayer2D prefab into the scene. For more complicated interaction, interface with PlatformerMotor2D's members and methods.

## PlatformerMotor2D Inspector Properties

### General ###

**Environment Check Mask** - This tells the motor what layer collisions to consider the environment (to determine if on the ground, wall, or corner).

**Environment Check Distance** - This is how far out the motor will check for the environment.  

### Movement ###

**Ground Speed** - Maximum ground speed.

**Time to Ground Speed** - The time, in seconds, it will take to reach ground speed. This is used to calculate acceleration.

**Ground Stop Distance** - If at full speed, how far will the motor skid to a stop.

**Horizontal Air Speed** - Maximum speed the motor will move horizontally while in the air.

**Time to Air Speed** - The time, in seconds, it will take to reach air speed. This is used to calculate acceleration.

**Air Stop Distance** - If at full air speed, how far will the motor 'skid' to a stop.

**Max Fall Speed** - Maximum fall speed (only y axis when negative).

**Max Fast Fall Speed** - Maximum fall speed when falling fast.

**Fast Fall Gravity Multiplier** - Gravity multiplier when falling fast. A value of 1 means no different, higher values mean faster fall acceleration.

**Preserve Momentum When Landing** - Unity's physics engine will reduce horizontal speed when the motor lands. This means movement speed will have to be accelerated again and can cause a slight pause. Check this one to keep horizontal speed intact.

### Jumping ###

**Base Jump Height** - The height, in Unity units, that the motor will jump to.

**Held Extra Jump Height** - If the motor is informed that the jump is held then this is the additional height the character will jump.

**Allow Double Jump** - If the motor should allow double jump. A double jump is considered when the motor is in the air and a double jump has not occurred. <commit_msg>Updated Readme to include the Air Jumps allowed parameter<commit_after># Unity 2D Platformer Controller
=======================

<!---%=description%-->

A customizable 2D platformer motor that interacts with Unity's physics engine to do mechanics such as double jumps, wall jumps, and corner grabs. Includes a player controlled prefab that can be dropped into any scene for immediate support.

<!---%=obtain%-->

####Obtain!####
[Releases](https://github.com/cjddmut/Unity-2D-Platformer-Controller/releases)

If you'd like the most up to date version (which is the most cool), then pull the repo or download it [here](https://github.com/cjddmut/Unity-2D-Platformer-Controller/archive/develop.zip) and copy the files in Assets to your project's Assets folder.

<!---%=docrest%-->

## Setup

For immediate player support, drop the PlatformerPlayer2D prefab into the scene. For more complicated interaction, interface with PlatformerMotor2D's members and methods.

## PlatformerMotor2D Inspector Properties

### General ###

**Environment Check Mask** - This tells the motor what layer collisions to consider the environment (to determine if on the ground, wall, or corner).

**Environment Check Distance** - This is how far out the motor will check for the environment.  

### Movement ###

**Ground Speed** - Maximum ground speed.

**Time to Ground Speed** - The time, in seconds, it will take to reach ground speed. This is used to calculate acceleration.

**Ground Stop Distance** - If at full speed, how far will the motor skid to a stop.

**Horizontal Air Speed** - Maximum speed the motor will move horizontally while in the air.

**Time to Air Speed** - The time, in seconds, it will take to reach air speed. This is used to calculate acceleration.

**Air Stop Distance** - If at full air speed, how far will the motor 'skid' to a stop.

**Max Fall Speed** - Maximum fall speed (only y axis when negative).

**Max Fast Fall Speed** - Maximum fall speed when falling fast.

**Fast Fall Gravity Multiplier** - Gravity multiplier when falling fast. A value of 1 means no different, higher values mean faster fall acceleration.

**Preserve Momentum When Landing** - Unity's physics engine will reduce horizontal speed when the motor lands. This means movement speed will have to be accelerated again and can cause a slight pause. Check this one to keep horizontal speed intact.

### Jumping ###

**Base Jump Height** - The height, in Unity units, that the motor will jump to.

**Held Extra Jump Height** - If the motor is informed that the jump is held then this is the additional height the character will jump.

**Air Jumps Allowed** - This sets the number of air jumps the character is allowed to perform. Setting it to 0 will disable air jumping altogether.
{'fraction_non_alphanumeric': 0.09145563854982693, 'fraction_numerical': 0.003097103297504099, 'mean_word_length': 4.268714011516315, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2782549', 'n_tokens_mistral': 1462, 'n_tokens_neox': 1360, 'n_words': 784}