Acceleration, the right way?
Hey everyone,
I've been trying to create a new class of vehicle and simulate a somewhat realistic acceleration/velocity relationship and behavior but with no success.
At least, I can't figure out how to do what I want to do.
Which is this:
I have a vehicle with a maxVelocity and an initialAcceleration properties, and what I want to find out is how to express the vehicle's acceleration with the two above mentioned variables so that the vehicle stops accelerating when it reaches its maxVelocity (meaning that acceleration reaches 0).
I believe there are some serious maths going on behind this seemingly simple thing, at least too serious for me, and I tried to remember what I learned years ago about arithmetic progressions and stuff like that but to no result other than a headache.
Does someone know how to do it, if it's actually possible. And if not, how you guys do to simulate an acceleration that looks like a car's gear.
Thanks!