Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting a location above the spline
#2
Hi

There is no ready out of the box solution for this issue in Curvy Splines. You will have to code something. Here is what seems to me like a good logic to implement:
Simplify the problem by restricting it to the XZ plane (this means you will have to project the ray on that plane). Then find the nearest point on the spline from that ray. Then finally restore the Y coordinate to get the point on the real XYZ ray.

About finding the nearest point from the spline to the ray. There might be an optimized way to do it that I am not aware of, but an easy way would be to test multiple points on the ray and compute their distance from the spline. To do so use GetNearestPoint and compute the distance between the result point an the ray point. To reduce the number of points tested, if their high number is an issue, you can use some optimization strategy such as Binary Search.

I hope this helped
Have a nice day
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply


Messages In This Thread
Getting a location above the spline - by EeSe01 - 07-11-2023, 08:10 AM
RE: Getting a location above the spline - by _Aka_ - 07-11-2023, 09:30 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Best way to duplicate a spline with an offset Kapistijn 8 1,349 04-12-2026, 03:18 PM
Last Post: _Aka_
Smile Constant speed along a spline? tfishell 1 654 11-13-2025, 11:32 AM
Last Post: _Aka_
  SplineController Ignores Follow-Up and Chooses Wrong Spline Josenildo 7 4,452 07-29-2025, 09:15 PM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 7 6,203 07-13-2025, 07:11 PM
Last Post: _Aka_

Forum Jump: