diff --git a/src/runtime-three/player-locomotion.ts b/src/runtime-three/player-locomotion.ts index 86d249fa..3d5d17cc 100644 --- a/src/runtime-three/player-locomotion.ts +++ b/src/runtime-three/player-locomotion.ts @@ -405,8 +405,13 @@ export function stepPlayerLocomotion( // the controller back into grounded/stick-to-ground logic. const ascendingFromPreviousFrame = options.verticalVelocity > VERTICAL_ASCENT_EPSILON; + const canUseImmediateGrounding = + options.previousLocomotionState === undefined || + options.previousLocomotionState.grounded; const currentlyGrounded = - currentGroundProbe.grounded && !ascendingFromPreviousFrame; + currentGroundProbe.grounded && + !ascendingFromPreviousFrame && + canUseImmediateGrounding; if (currentlyGrounded) { coyoteTimeRemainingMs = options.movement.jump.coyoteTimeMs;