From d028ac273dab17416ff6fd2f93804ebce8b8b1da Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Fri, 1 May 2026 16:46:59 +0200 Subject: [PATCH] auto-git: [change] src/runtime-three/first-person-navigation-controller.ts --- .../first-person-navigation-controller.ts | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/runtime-three/first-person-navigation-controller.ts b/src/runtime-three/first-person-navigation-controller.ts index 72348333..1b92ed62 100644 --- a/src/runtime-three/first-person-navigation-controller.ts +++ b/src/runtime-three/first-person-navigation-controller.ts @@ -1027,6 +1027,47 @@ export class FirstPersonNavigationController implements NavigationController { } }) : null; + + if ( + climbTopOutAssist === null && + playerMovement.edgeAssist.enabled && + climbMovement.motion.y > 0 + ) { + const climbLedgeGrabTarget = resolvePlayerLedgeGrabTarget({ + feetPosition: this.feetPosition, + shape: this.standingPlayerShape, + direction: { + x: -activeSurface.normal.x, + y: 0, + z: -activeSurface.normal.z + }, + pushToTopHeight: playerMovement.edgeAssist.pushToTopHeight, + canOccupyShape: (feetPosition, shape) => + this.context?.canOccupyPlayerShape?.(feetPosition, shape) ?? true, + probeGround: (feetPosition, shape, maxDistance) => + this.context?.probePlayerGround?.( + feetPosition, + shape, + maxDistance + ) ?? { + grounded: false, + distance: null, + normal: null, + slopeDegrees: null + } + }); + + if (climbLedgeGrabTarget !== null) { + this.enterLedgeGrab( + climbLedgeGrabTarget, + climbMovement.inputMagnitude + ); + this.updateCameraTransform(); + this.publishTelemetry(); + return true; + } + } + this.climbSurface = climbTopOutAssist === null ? activeSurface : null; const resolvedMotion =