I’m finally at the stage where I get to implement dead reckoning in my game…
I have tried a few things already, like projecting a vector in front of the car’s trajectory and then mirroring it along the car’s local x and y. Previously, I have tried graphing a catmull spline curve, but I have no idea how I should position the curve, or what to do with it, etc…
I suppose there are not a lot of people who have experience in this, but if you have any good ideas, that would sure help.
My goal is to smooth out a very fast moving vehicle, also projecting it slightly into the future.
Right… but then I probably need to smooth it out. The car is after all traveling around 100+ MPH on average. Any slight lag is going to throw the car off by a few feet.
Well, that’s just a normal cubic interpolation, for example a bi-cubic interpolation like this: Cubic interpolation - Paulinternet.nl
Honestly though, for this stuff linear interpolation works pretty well in my experience.
Thanks fholm! I’m going to try something like you were saying, as it seems to make a lot more sense than what I was trying before… And I’ll check out those linear and cubic formulas and see how they work.
I think I got it now… See, I never understood how to use a spline graph for smoothing algorithms. The link you gave me helped a lot. I now have a nice catmull-rom interpolate script working. Next, I’ll be fine tuning the leading vector to make better predictions.