Hi! I am using the Spline node that returns the world location of the closest point in a Spline from a World location reference and is awesome
But I also need the TIME value (location IN the spline of the results)
I wish this node were something like this:
As I need both (the location and its time equivalen int the spline)
I am thinking about making some recursive function that consists
of split time in 100ths (like split 0 to 1 100 times) and compare the
location of that position in the spline with the results of "find location closest to world location, results for example closests is at time 0,3…then split from 0,25 to 0,35 100 times and repeat twice …more iterations, more precision but I am afraid this is
a very expensive function.
Is there are ready to use node already or a best approach you can suggest?
Thanks!
With ‘Find Location CLosest to World location’ I can get a position in the curve (world space) but I can’t get where is that point in the curve ranged 0 to 1 (time).
Imagine the curve is a track circuit, I get the closest point from the car in the curve and I need the % of the track traveled.
The Keys are the points that define the spline. with:
Find Location Closest to World Location and…
Find Input key Closest to World location and…
Get Spline Length and…
Get num of segments
I can do some rule of 3 and get the % 0 to 100…thats good
Downside its a % based on Keys and not actual distance in the path.
What I mean is that you can have a spline with 10 points where first 9 are really
close and the 10th is really far and this wont work…will just sort of almost work
with even distributed keys along the path but its the best I have for now so I will take it