Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I find closest spline ?
#4
In the method I linked to you, the second parameter, which is an out parameter, is the nearest point on the spline, in its local coordinates. Then use Unity's Transform.TransformPoint to transform the point to global coordinates.

About getting a point from a TF value, you can do that using CurvySpline.Interpolate(float tf) to transform a TF to a Vector3, in the local coordinates system of the spline.
Here is its documentation: https://api.curvyeditor.com/520/class_fluffy_underware_1_1_curvy_1_1_curvy_spline.html#a5a2733111f8c35a6be80b42887988f39
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Messages In This Thread
How do I find closest spline ? - by dazz777 - 02-17-2019, 03:51 PM
RE: How do I find closest spline ? - by _Aka_ - 02-18-2019, 11:05 AM
RE: How do I find closest spline ? - by dazz777 - 02-19-2019, 01:25 PM
RE: How do I find closest spline ? - by _Aka_ - 02-19-2019, 03:49 PM
RE: How do I find closest spline ? - by dazz777 - 02-20-2019, 09:47 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  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_
  GO can't fit end of the spline GameDeveloperek4123 3 14 03-04-2024, 11:06 AM
Last Post: _Aka_

Forum Jump: