auto-git:
[change] src/entities/entity-instances.ts
This commit is contained in:
@@ -951,16 +951,37 @@ export function resolveCameraRigDocumentPosition(
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (baseTarget === null) {
|
if (baseTarget === null) {
|
||||||
return options.fallbackToPathStart === true &&
|
if (options.fallbackToPathStart !== true) {
|
||||||
resolvedPath.points.length > 0
|
return null;
|
||||||
? cloneVec3(resolvedPath.points[0]!.position)
|
}
|
||||||
: null;
|
|
||||||
|
return rig.railPlacementMode === "mapTargetBetweenPoints"
|
||||||
|
? sampleResolvedScenePathPosition(
|
||||||
|
resolvedPath,
|
||||||
|
rig.railStartProgress
|
||||||
|
)
|
||||||
|
: resolvedPath.points.length > 0
|
||||||
|
? cloneVec3(resolvedPath.points[0]!.position)
|
||||||
|
: null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return resolveNearestPointOnResolvedScenePath(
|
if (rig.railPlacementMode === "mapTargetBetweenPoints") {
|
||||||
resolvedPath,
|
const mappedProgress = mapWorldPointToScenePathProgressBetweenPoints({
|
||||||
baseTarget
|
point: baseTarget,
|
||||||
).position;
|
trackStartPoint: rig.trackStartPoint,
|
||||||
|
trackEndPoint: rig.trackEndPoint,
|
||||||
|
railStartProgress: rig.railStartProgress,
|
||||||
|
railEndProgress: rig.railEndProgress
|
||||||
|
});
|
||||||
|
|
||||||
|
return sampleResolvedScenePathPosition(
|
||||||
|
resolvedPath,
|
||||||
|
mappedProgress.railProgress
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return resolveNearestPointOnResolvedScenePath(resolvedPath, baseTarget)
|
||||||
|
.position;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user