Skip to content

Rigidbody2D Jump In Air

In-air jump action for a Rigidbody2D. Used for double jumps.

Set Jump using an input action like Input Get Button.

Parameter Description
Rigidbody The Rigidbody to control.
Jump Assign a variable that is true to try to jump. Use an input action like Input Get Button to set this.
Jump Speed The upward speed to apply when jumping.
Jump Count Assign a variable to track the number of jumps taken. Reset this variable to zero when grounded. Or reset it with a Power-up to keep jumping!
Max Jumps The maximum number of in-air jumps allowed. Set to 1 for a double jump, 2 for a triple jump, etc.

Usages

Used in platformers to make a character double jump.