I am trying to Get position on spline or TF that is relative to world position. here in image the spline is 2D and its positioned at (0,0) and i have gizmo point (green one) that its position is (5,8,-4).
I need to get the position or TF on spline for a point that is also have same x as gizmo point (5).
(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
CurvySpline.GetNearestPointTF() has an oveeride that returns you the position on the spline. Otherise, you can use Interpolate. I recommand you to read the documentation to know about the basic functions:
https://curvyeditor.com/documentation/extend/apigeneral#commonly_used_methods
then if needed
api.curvyeditor.com
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
(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);