From a721bcd2eb7c1361b3f110a166762a09fd974d7e Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Thu, 23 Apr 2026 08:52:08 +0200 Subject: [PATCH] auto-git: [change] src/runtime-three/runtime-host.ts --- src/runtime-three/runtime-host.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/runtime-three/runtime-host.ts b/src/runtime-three/runtime-host.ts index fb8078a4..f0c95c49 100644 --- a/src/runtime-three/runtime-host.ts +++ b/src/runtime-three/runtime-host.ts @@ -1278,8 +1278,19 @@ export class RuntimeHost { return null; } - return resolveNearestPointOnResolvedScenePath(path, targetPosition) - .position; + if (rig.railPlacementMode === "mapTargetBetweenPoints") { + const mappedProgress = mapWorldPointToScenePathProgressBetweenPoints({ + point: targetPosition, + trackStartPoint: rig.trackStartPoint, + trackEndPoint: rig.trackEndPoint, + railStartProgress: rig.railStartProgress, + railEndProgress: rig.railEndProgress + }); + + return sampleResolvedScenePathPosition(path, mappedProgress.railProgress); + } + + return resolveNearestPointOnResolvedScenePath(path, targetPosition).position; } } }