Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get Closest Point on Spline
#2
Hi

CurvySpline.GetNearestPoint(...) returns the nearest point on a spline.

CurvySpline.GetNearestPointTF(...) returns the nearest point on a spline and its TF value.

To position your spline controller accordingly:
yourSplineController.RelativePosition = nearestTF

More is explained in the documentation of these methods/components. Also, the example scene 05_NearestPoint can be of help if you struggle to use the GetNearestPoint method.

Did this help?
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
Get Closest Point on Spline - by neppyneptune1 - 10-14-2022, 07:21 PM
RE: Get Closest Point on Spline - by _Aka_ - 10-15-2022, 11:17 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting Distance from a World Point zorksox 2 2 2 hours ago
Last Post: zorksox
  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: