Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TF to world position
#1
I apologize if I missed a similar answer, but I can't figure this one out.

I want to find out the world position of a point of the spline that's identified by its TF.

My goal is to have an object more or less follow a spline, but without using the spline controller script.

My idea was to simply, do this:

[Image: Zhk8GPi.png]

- look for a point ahead of the object
- get the TF of that point on the spline using GetNearestPointTF
- find the world coordinates of that point (local coordinates would be ok since it's easy to transform to world coords using the splines world coordinates).

Thanks!
Reply
#2
Hi
What you are looking for is: yourSpline.Interpolate(tf, Space.World);
I hope this helped
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
(02-25-2022, 11:18 AM)_Aka_ Wrote: Hi
What you are looking for is: yourSpline.Interpolate(tf, Space.World);
I hope this helped
Have a nice day

Thanks, that's exactly what I needed. I had actually found the answer myself just after posting (stackoverflow syndrome ^^), but I couldnt remove the thread since it was my first post and it was invisible to me. Anyway, thanks.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting object on spline Position when Spline has coordinates larger than 2000 velikizlivuk 5 9 09-05-2023, 01:01 PM
Last Post: velikizlivuk
  How to detect bend in a spline or strait part of spline at position velikizlivuk 10 29 08-14-2023, 12:08 PM
Last Post: _Aka_
Video How do I merge splines only if some control points are at the sam position? arcade.autumn 5 17 02-13-2023, 09:35 AM
Last Post: _Aka_
  Generate UV in world space GameJazz 2 4 12-08-2022, 04:44 PM
Last Post: GameJazz

Forum Jump: