From 8467df796a8828934f5c38da76834c75a8d41338 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sat, 11 Apr 2026 21:01:42 +0200 Subject: [PATCH] Update RapierCollisionWorld to use maxStepHeight --- src/runtime-three/rapier-collision-world.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/runtime-three/rapier-collision-world.ts b/src/runtime-three/rapier-collision-world.ts index 03d73f6a..633d942f 100644 --- a/src/runtime-three/rapier-collision-world.ts +++ b/src/runtime-three/rapier-collision-world.ts @@ -379,6 +379,7 @@ export class RapierCollisionWorld { world, characterController, playerCollider, + Math.max(CHARACTER_CONTROLLER_SNAP_TO_GROUND_DISTANCE, maxStepHeight), playerShape.mode === "none" ? null : getFirstPersonPlayerShapeSignature(playerShape) @@ -389,6 +390,7 @@ export class RapierCollisionWorld { private readonly world: RAPIER.World, private readonly characterController: RAPIER.KinematicCharacterController | null, private readonly playerCollider: RAPIER.Collider | null, + private readonly snapToGroundDistance: number, private currentPlayerShapeSignature: string | null ) {} @@ -455,7 +457,7 @@ export class RapierCollisionWorld { if (snapToGroundWasEnabled) { this.characterController.enableSnapToGround( - CHARACTER_CONTROLLER_SNAP_TO_GROUND_DISTANCE + this.snapToGroundDistance ); }