Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Closest Point on a curve spline.
#1
Hi everyone,

   I'm new using Curvy plugin. I want to get the closest point on a spline from an arbitrary point in the space but I'm stuck. 

   I've created a closed curvy spline. When the game starts, I create a sphere in the world and then I look for the nearest point. I'm using the method curvySpline.GetNearestPointTF(spherePosition) but it always return -1.

   What am I doing wrong?

Thanks in advance.
Reply
#2
The only reason GetNearestPointTF() may return -1 (=invalid) is that you call it before the spline is initialized. See "Before using the API" here!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  snap to the curve created by the curvy splines segment points ShiroeYamamoto 0 0 9 hours ago
Last Post: ShiroeYamamoto
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 13 03-04-2024, 11:06 AM
Last Post: _Aka_
  Avoiding runtime GC allocations on control point position change Ell223 8 18 02-24-2024, 10:43 AM
Last Post: _Aka_

Forum Jump: