01-25-2018, 01:24 PM
(01-25-2018, 02:15 AM)nomadigi Wrote: It seems like carTf is not increasing linearly.
It is indeed not linear in most cases, and this is normal.
If your are curious about why, take a look at this Wikipedia page, and notice how, in most cases, the point travels with different speeds depending if it is around the spline middle or around it's end.
So, your solution (setting the spline to linear) is not really one, since it will work only on linear splines. If you have a curved spline, you will meet the same problem again.
The real issue comes from how you define your car position:
Code:
float roadPosition = carTf * RoadSpline.Length;
Code:
float roadPosition = RoadSpline.TFToDistance(carTf)
Splines have often different versions of the same methods, one taking TFs as an input, and the other taking distances.
Let me know if this doesn't help.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.