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
  Getting Distance from a World Point zorksox 3 5 04-16-2024, 07:30 PM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 6 03-28-2024, 10:08 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_

Forum Jump: