PlatformerController2DData
Defined in: sdk/src/physics/PlatformerController2D.ts:14
The fields of the PlatformerController2D component.
Properties
Section titled “Properties”airAcceleration
Section titled “airAcceleration”airAcceleration:
number
Defined in: sdk/src/physics/PlatformerController2D.ts:19
airDeceleration
Section titled “airDeceleration”airDeceleration:
number
Defined in: sdk/src/physics/PlatformerController2D.ts:22
airJumps
Section titled “airJumps”airJumps:
number
Defined in: sdk/src/physics/PlatformerController2D.ts:38
Extra jumps before landing again.
coyoteTime
Section titled “coyoteTime”coyoteTime:
number
Defined in: sdk/src/physics/PlatformerController2D.ts:34
Seconds after leaving the ground that a jump still counts as from the ground.
dropPressed
Section titled “dropPressed”dropPressed:
boolean
Defined in: sdk/src/physics/PlatformerController2D.ts:52
Input: ask to drop through a one-way platform. Consumed by the next fixed step.
dropTime
Section titled “dropTime”dropTime:
number
Defined in: sdk/src/physics/PlatformerController2D.ts:40
Seconds a drop through a one-way platform lasts.
enabled
Section titled “enabled”enabled:
boolean
Defined in: sdk/src/physics/PlatformerController2D.ts:53
fallGravityScale
Section titled “fallGravityScale”fallGravityScale:
number
Defined in: sdk/src/physics/PlatformerController2D.ts:26
Gravity multiplier while falling. Above 1 lands faster than it rose, which reads as weight.
gravity
Section titled “gravity”gravity:
number
Defined in: sdk/src/physics/PlatformerController2D.ts:24
Downward acceleration, world pixels per second squared.
groundAcceleration
Section titled “groundAcceleration”groundAcceleration:
number
Defined in: sdk/src/physics/PlatformerController2D.ts:18
How fast it reaches that speed on the ground, and in the air.
groundDeceleration
Section titled “groundDeceleration”groundDeceleration:
number
Defined in: sdk/src/physics/PlatformerController2D.ts:21
How fast it sheds it when the stick centres, on the ground and in the air.
jumpBuffer
Section titled “jumpBuffer”jumpBuffer:
number
Defined in: sdk/src/physics/PlatformerController2D.ts:36
Seconds a jump pressed too early is remembered, to happen on landing.
jumpCut
Section titled “jumpCut”jumpCut:
number
Defined in: sdk/src/physics/PlatformerController2D.ts:32
How much of a rising speed survives letting go of jump, 0..1. 1 makes every jump full height.
jumpHeld
Section titled “jumpHeld”jumpHeld:
boolean
Defined in: sdk/src/physics/PlatformerController2D.ts:48
Input: the jump button is down.
jumpPressed
Section titled “jumpPressed”jumpPressed:
boolean
Defined in: sdk/src/physics/PlatformerController2D.ts:50
Input: the jump button went down. Consumed by the next fixed step.
jumpSpeed
Section titled “jumpSpeed”jumpSpeed:
number
Defined in: sdk/src/physics/PlatformerController2D.ts:30
Upward speed a jump starts with; 0 disables jumping.
keepPlatformVelocity
Section titled “keepPlatformVelocity”keepPlatformVelocity:
boolean
Defined in: sdk/src/physics/PlatformerController2D.ts:42
A jump keeps the velocity of the platform it left.
maxFallSpeed
Section titled “maxFallSpeed”maxFallSpeed:
number
Defined in: sdk/src/physics/PlatformerController2D.ts:28
The fastest it falls.
moveInput
Section titled “moveInput”moveInput:
number
Defined in: sdk/src/physics/PlatformerController2D.ts:46
Input: -1 left to 1 right.
moveSpeed
Section titled “moveSpeed”moveSpeed:
number
Defined in: sdk/src/physics/PlatformerController2D.ts:16
Top running speed, world pixels per second.
readKeyboard
Section titled “readKeyboard”readKeyboard:
boolean
Defined in: sdk/src/physics/PlatformerController2D.ts:44
Read the keyboard itself. Off, a game or an AI writes moveInput, jumpHeld, jumpPressed and dropPressed.