Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Closest Point on Spline (+Offset) to some World Position
#5
(01-23-2018, 05:12 PM)_Aka_ Wrote: 20 calls per frame should not create a performance issue.

If you end up in the future with GetNearestPointTF being a performance bottleneck, keep in mind that the there are overrides of this method that allow you to search for the nearest point not in all the spline's segments, but only in subset of the spline's segments. In your case, and as long as a car does not teleport, you can safely assume that, if a car was in a segment X this frame, it will the next frame either in the same segment X, or in one of X neighbors.

Awesome. You're so helpful! I also am looking at 05_NearestPoint. I will try this on my new car with a curved track and post a video update. Right after I leave my review Big Grin
Reply


Messages In This Thread
RE: Closest Point on Spline (+Offset) to some World Position - by nomadigi - 01-23-2018, 06:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Best way to duplicate a spline with an offset Kapistijn 8 1,394 04-12-2026, 03:18 PM
Last Post: _Aka_
  Control Point Interpolation Overrides. rickgplus 1 541 12-11-2025, 08:52 AM
Last Post: _Aka_
Smile Constant speed along a spline? tfishell 1 662 11-13-2025, 11:32 AM
Last Post: _Aka_
  SplineController Ignores Follow-Up and Chooses Wrong Spline Josenildo 7 4,467 07-29-2025, 09:15 PM
Last Post: _Aka_

Forum Jump: