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(