01-23-2018, 05:12 PM
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.
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.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.