Skip to main content

Platformer3DBehaviorOptions

@zylem/game-lib


@zylem/game-lib / behavior / Platformer3DBehaviorOptions

Interface: Platformer3DBehaviorOptions

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-3d.d.ts:194

Platformer behavior options (typed for entity.use() autocomplete)

Properties​

autostep?​

optional autostep?: 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-3d.d.ts:210

Autostep over small ledges, or false to disable (default: { maxHeight: 0.3, minWidth: 0.1 })


characterOffset?​

optional characterOffset?: 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-3d.d.ts:217

Character controller collision offset (default: 0.05)


gravity?​

optional gravity?: 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-3d.d.ts:204

Gravity force (default: 9.82)


jumpForce?​

optional jumpForce?: 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-3d.d.ts:200

Initial jump force (default: 12)


maxJumps?​

optional maxJumps?: 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-3d.d.ts:202

Maximum number of jumps (default: 1)


runSpeed?​

optional runSpeed?: 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-3d.d.ts:198

Sprint/run speed (default: 24)


shape?​

optional shape?: 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-3d.d.ts:219

Explicit KCC capsule override (requires useAttachedCollider: false).

halfHeight​

halfHeight: number

offset?​

optional offset?: [number, number, number]

radius​

radius: number


slopeClimbAngle?​

optional slopeClimbAngle?: 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-3d.d.ts:206

Maximum slope angle in degrees the character can walk up (default: 50)


slopeSlideAngle?​

optional slopeSlideAngle?: 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-3d.d.ts:208

Slope angle in degrees past which the character slides (default: 40)


snapToGroundDistance?​

optional snapToGroundDistance?: 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-3d.d.ts:215

Snap-to-ground distance for downhill/step-down stability (default: 0.3)


useAttachedCollider?​

optional useAttachedCollider?: 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-3d.d.ts:225

When true (default), KCC reads shape + offset from the attached Rapier collider.


walkSpeed?​

optional walkSpeed?: 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-3d.d.ts:196

Base walking speed (default: 12)