From e0e895add5582133e92a94e08d450691a04c34f0 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sun, 12 Apr 2026 01:40:14 +0200 Subject: [PATCH] Reorder and update character controller checks in collision world --- src/runtime-three/rapier-collision-world.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/runtime-three/rapier-collision-world.ts b/src/runtime-three/rapier-collision-world.ts index 835fcadf..2e235c4f 100644 --- a/src/runtime-three/rapier-collision-world.ts +++ b/src/runtime-three/rapier-collision-world.ts @@ -465,17 +465,13 @@ export class RapierCollisionWorld { ); const supportGrounded = supportProbe.grounded; - if (motion.y > COLLISION_EPSILON && snapToGroundWasEnabled) { - this.characterController.disableSnapToGround(); - } - - if (!supportGrounded && autostepWasEnabled) { - this.characterController.disableAutostep(); - } - const computeResolvedMovement = (allowAutostep: boolean) => { this.playerCollider.setTranslation(currentCenter); + if (motion.y > COLLISION_EPSILON && snapToGroundWasEnabled) { + this.characterController.disableSnapToGround(); + } + if (autostepWasEnabled) { if (allowAutostep) { this.characterController.enableAutostep(