Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get position on spline relative to world position
#9
(05-19-2021, 01:18 AM)smackledorf Wrote:
(05-10-2021, 07:07 AM)_Aka_ Wrote: Hi
I believe you need to use the CurvySpline.GetNearestPointTF()
Have a nice day

Hello, is there a function for the opposite effect? Ability to plug in a TF and get the world position of that point at the the spline? I want to get the world position on the spline that is closest to my player as a Vector

Since posting this I figured out the solution, nevermind! For those who stumble here in the future:

Code:
Vector3 P;

float pTf = currentSpline.GetNearestPointTF(transform.position, out P);

Where P is the world position of that TF!
Reply


Messages In This Thread
RE: Get position on spline relative to world position - by smackledorf - 05-19-2021, 05:06 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Spline Issue Leading to Unity Freeze Pankaj09 1 201 08-24-2026, 11:28 PM
Last Post: _Aka_
  Connecting Multiple Spline Nodes Issue Ritesh Kadam 1 160 08-22-2026, 11:24 PM
Last Post: _Aka_
  Spline Spots from 2 samples. BitBlit 8 1,079 06-30-2026, 11:49 AM
Last Post: _Aka_
  Best way to duplicate a spline with an offset Kapistijn 8 2,473 04-12-2026, 03:18 PM
Last Post: _Aka_

Forum Jump: