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
  Freewalk mode, then return to spline mythstified 6 154 08-30-2018, 10:29 AM
Last Post: Jacki
  Creating a threaded pole along a spline? spedepasanen 1 74 08-14-2018, 12:25 PM
Last Post: _Aka_
  Generate Spline and Segments dynamically with a script?? mythstified 3 149 08-10-2018, 12:43 PM
Last Post: _Aka_
  Instantiating Prefab on the spline for infinite track hjk27 3 174 08-02-2018, 12:51 PM
Last Post: _Aka_

Forum Jump: