Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I get the closest Spline Control Point
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
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 will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.

Possibly Related Threads…
Thread Author Replies Views Last Post
  Avoiding runtime GC allocations on control point position change Ell223 8 15 02-24-2024, 10:43 AM
Last Post: _Aka_
  Keeping a fixed spline length jh092 3 14 02-21-2024, 06:25 AM
Last Post: Primrose44
  GO can't fit end of the spline GameDeveloperek4123 1 4 02-13-2024, 10:18 AM
Last Post: _Aka_
  How could I get position in spline from "From" value in BuildRasterizedPath? Chanon 1 6 02-12-2024, 09:54 PM
Last Post: _Aka_

Forum Jump: