Terminal Velocity?

Curious if we wanted to implement a terminal velocity. (Acceleration stops at a certain point due to drag and other factors). For example on earth, a person falling through the air on Earth reaches terminal velocity (stops accelerating the speed of the fall) after about 12 seconds. Now I highly doubt we’d be falling that long in this game but curious if that’s relatively easy to model.

I assume you’d have to measure the seconds of the fall in seconds and have a while loop that looks to see if falling for <12 seconds then acceleration will continue to increase every second, otherwise acceleration stops increasing. Am I correct?

In my opinion, there’s not really any need to track the time since you can already calculate what the velocity would be with a given rate of acceleration and time time. Calculate the terminal velocity once, and then check for it while falling. If the current falling velocity exceeds the precalculated terminal velocity, then you can reset the current velocity to the terminal velocity. You don’t really need to track the elapsed seconds at all.

I would do something along the lines of figuring what you want the terminal velocity to be, say 120m/s. If you wanted a more accurate rate of falling, you could do the math according to the setup you have.
I would do something like this:
if (Yvelocity>120)

The acceleration will still be trying to increase it, but at the same cycle it will be limited again to 120.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms