but how to smoothen the 0.2 so it should be not sharp move to up but smoothly like some exponential with lerp? I mean not 0.2 but sth like 0.01, 0.02, …, 0.2
why I want this: because I want the car to moves up a little to follow the bump
If you don’t need to do any additional calculations, while the car is in the air, you might want to consider using Tween library. Otherwise, you can find its easing functions on github. For example, I copied the .cubicOut() directly from there.
And if you are using Ammo physics, then you don’t need to calculate these bumps yourself. Instead, you would want to send an impulse to the car from the bottom, which will bump it up and the physics engine will handle the rest.