Platformer2DBehaviorOptions
@zylem/game-lib / behavior / Platformer2DBehaviorOptions
Interface: Platformer2DBehaviorOptions
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-2d.d.ts:159
Platformer 2D behavior options (typed for entity.use() autocomplete)
Properties
autostep?
optionalautostep?:false| \{maxHeight:number;minWidth:number; \}
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-2d.d.ts:181
Autostep over small step-ups, or false to disable (default: { maxHeight: 0.25, minWidth: 0.05 })
characterOffset?
optionalcharacterOffset?:number
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-2d.d.ts:188
Character controller collision offset (default: 0.05)
coyoteTime?
optionalcoyoteTime?:number
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-2d.d.ts:171
Coyote time in seconds (default: 0.1)
gravity?
optionalgravity?:number
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-2d.d.ts:169
Gravity force (default: 20)
jumpBufferTime?
optionaljumpBufferTime?:number
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-2d.d.ts:173
Jump buffer time in seconds (default: 0.1)
jumpCutMultiplier?
optionaljumpCutMultiplier?:number
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-2d.d.ts:175
Velocity multiplier when releasing jump early (default: 0.5)
jumpForce?
optionaljumpForce?:number
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-2d.d.ts:165
Initial jump force (default: 12)
maxJumps?
optionalmaxJumps?:number
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-2d.d.ts:167
Maximum number of jumps (default: 1)
runSpeed?
optionalrunSpeed?:number
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-2d.d.ts:163
Sprint/run speed (default: 14)
shape?
optionalshape?:object
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-2d.d.ts:190
Explicit KCC capsule override (requires useAttachedCollider: false).
halfHeight
halfHeight:
number
offset?
optionaloffset?: [number,number,number]
radius
radius:
number
slopeClimbAngle?
optionalslopeClimbAngle?:number
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-2d.d.ts:177
Maximum slope angle in degrees the character can walk up (default: 50)
slopeSlideAngle?
optionalslopeSlideAngle?:number
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-2d.d.ts:179
Slope angle in degrees past which the character slides (default: 40)
snapToGroundDistance?
optionalsnapToGroundDistance?:number
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-2d.d.ts:186
Snap-to-ground distance for downhill/step-down stability (default: 0.2)
useAttachedCollider?
optionaluseAttachedCollider?:boolean
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-2d.d.ts:196
When true (default), KCC reads shape + offset from the attached Rapier collider.
walkSpeed?
optionalwalkSpeed?:number
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-2d.d.ts:161
Base walking speed (default: 8)