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
  Getting Distance from a World Point zorksox 3 5 04-16-2024, 07:30 PM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 6 03-28-2024, 10:08 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_

Forum Jump: