Slow-mo when a tank is falling?

Here is the issue on the video: https://youtu.be/2hR5E_hdS_Q?t=12s
Captured from Ben’s github, commit “B82”

Look for the last ~10 sec, when the tank is falling down - it happens pretty slow for some reason…

Will this issue be handled later? Or it’s kind of “ok”?

It’s never covered but it happens because there’s no air. You’re ​essentially playing​ in a vacuum.

Actually, from the physics side, it looks exactly opposite – like I’m playing in a water.

Kinda the same point. There’s no air resistance. The only thing acting against you is gravity which is 9.81 m/s which is the same on earth. I think the terminal velocity is set rather low but it would still feel somewhat floaty if you increased that.

Not the same, it’s opposite :slight_smile:

Don’t see a point to argue, but it does not looks like proper “vacuum” physics. With 9.81m/s it will fall very fast, while it’s floating as in dense environment – not even air, rather water or something like that.

I see it’s not the lessons/project issue, rather the UE4 issue…

Hello Dan
What was the reason this lecture

  1. what was improved by refactoring SetThrottle() function.we only transfer all code into DriveTrack() function?

  2. what was the purpose to delete TickComponent() and sideways slippage code remove into OnHit() function ? DriveTrack() also calls from OnHit()
    for what are better all this changes ?

  1. Can’t remember
  2. So applying force on the tank only happens when it’s on something. Before you could fly off of a hill and keep going.

ahhh, and how define OnHit() Event that the Tank is on the ground ? does it use the Landscape’s Collision ?

Anything that would block.

Thank you Dan

Most likely your framerate is too low. Here’s some explanation on what I found about Physics Substepping and how enabling that feature can solve the issue.

The problem

Doing some physcis playground project for testing and playing around with physics.

In the video below, you can see, how my simple car falls like it was on the moon when I reduce framerate to 10FPS.

You can set this via t.maxfps 10 console command, which is what I always do because otherwise UE4Editor keeps my GPU 100% busy, eating up energy and making noise.

The root cause and solution

In Project Settings > Physics you will find the following section:

ue4-physics-substepping1

Parameter Max Physics Delta Time has a default value of 33ms. This is a clamping value for the physics delta time, as hover over help shows.

Physics calculations are done at a physics timestep maximum of 33ms. As long as the render frame time is below that value, physics calculations are done at render delta time.
But if framerate drops below 33.3fps, Render delta time increases above that Physics Delta time limit and the physics calculations get clamped to 33ms.

Result movements of characters resulting from physics calculations are done only at 33ms while render time is 100ms - a significant slowdown of the movement over time.

Now checking the Substepping Checkbox.

ue4-physics-substepping2

What happens is, that UE4 now will add up to Max Substeps Physics Substep calculations, each with Max Substep Delta Timeinto the render frame tick interval. As long as MaxSubsteps * Max Substep Delta Time is below the frame time, the frame gets filled up completely with multiple Physics substeps.

In this example:

6 * 0.016667 seconds = 100ms 

This is enough to cover the complete frametime at maxfps 10. The result:

Of course, this is at cost of performance, because more calculation steps are needed. So you might want disable sub-stepping and just increase the Max Physics Delta Time to fit to lower frame rates. Here, the result for a setting of

Max Physcis Delta Time = 0.1

shows, how the physics begin to behave somewhat strange:

This is because step size for physics is vital for stability of calculations.

Privacy & Terms