From 0e4174a98f0e3f510b3cc79b11e2067593cfb01b Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Tue, 12 May 2026 23:35:51 +0200 Subject: [PATCH] Pass terrain context to path sampling in ViewportHost --- src/viewport-three/viewport-host.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/viewport-three/viewport-host.ts b/src/viewport-three/viewport-host.ts index a7603194..40233a67 100644 --- a/src/viewport-three/viewport-host.ts +++ b/src/viewport-three/viewport-host.ts @@ -6038,10 +6038,14 @@ export class ViewportHost { const trackStartPoint = toLocalPoint(entity.trackStartPoint); const trackEndPoint = toLocalPoint(entity.trackEndPoint); const railStartPoint = toLocalPoint( - sampleScenePathPosition(authoredPath, entity.railStartProgress) + sampleScenePathPosition(authoredPath, entity.railStartProgress, { + terrains: this.getPathTerrainGlueTerrains() + }) ); const railEndPoint = toLocalPoint( - sampleScenePathPosition(authoredPath, entity.railEndProgress) + sampleScenePathPosition(authoredPath, entity.railEndProgress, { + terrains: this.getPathTerrainGlueTerrains() + }) ); preview.previewGroup.visible = true;