Open BlindTerran opened 2 years ago
Since two vehicles are moving at different velocity, over time the actual SRD and the Minimum gap can have deviation. Try calculate SRD and minimum gap at run time
Method 2 that modifies the general algorithm; known acceleration, the same formula calculate the SRD for a smoother result
Instead of using distance traveled, predefined a variable delta time that vehicle takes to decelerate to replace SRD and use v.f-v.i / delta time to calculate acceleration
The actual minimum gap between vehicles does not match the final variable MIN_GAP; the SRD also has the same issue. Using general velocity reduction algorithm instead of physics motion works fine for this.