Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I find closest spline ?
#2
Hi,

You will have to go through all the splines, compute the distance from your point for each one of them, and then selecting the spline with the shortest distance.
To compute that distance, you will have to use the CurvySpline.GetNearestPointTF(Vector3 localPosition, out Vector3 nearest).
Here is its documentation: https://api.curvyeditor.com/520/class_fluffy_underware_1_1_curvy_1_1_curvy_spline.html#a826c07a945b2ddc06e627369c49bc5a6

Let me know if you have any other questions
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


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: