Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I get the closest Spline Control Point
#1
I've tried figuring out how to get the closet control point but nothing I've found gets me what I need. The closest I could find was TFToSegment, but that gives me a segment, not the control points. 

I'm trying to get the closest control point to my mouse position, so if I had a spline of 2 control points, and I'm at the start of a spline, I'd be at control point 1, if I was at the end of the spline, I'd be at control point 2
Reply
#2
Hi
Control Points being normal unity GameObjects, you can apply on them any solution for finding the closest game object. Such solutions can be easily found on the internet.
Have a nice day
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply
#3
thanks!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  OnAfterControlPointAdded - Control Point is null jh092 5 213 02-04-2025, 09:31 PM
Last Post: _Aka_
  Disable a spline's gizmo when not selected or disabled. mikechr2000 1 99 02-03-2025, 09:34 AM
Last Post: _Aka_
Information Questions regarding spline colliders and collisions with rigidbodies Spyboticer 7 355 01-20-2025, 12:25 PM
Last Post: _Aka_
  Extrude mesh along spline. New and confused user GhostStalker 3 123 01-02-2025, 09:58 AM
Last Post: _Aka_

Forum Jump: