Why is Falling Velocity capped at 4000?

A pawn with a CharacterMovement controller seems to be unable to exceed 4000 (+/- imprecision) total velocity when in the Falling movement state. It’s so hard capped that if you move sideways, it will actually make you fall more slowly just to maintain the same velocity magnitude. This cap does not exist for other states such as Walking or Flying.

After looking into it fairly deeply in this related answerhub page I believe this movement cap to be unintended functionality. It isn’t documented anywhere, it’s a magic number that doesn’t seem to be dependent on world scale or CharacterMovement parameters of any kind, and it doesn’t have a good reason for existing. I haven’t even been able to pinpoint where in the source it’s occurring.

This is blocking my project so any help at all would be greatly appreciated.

1 Like

I’m currently not anywhere near UE but I’ve checked some documentation. Have you tried overriding UCharacterMovementComponent::PhysFalling ? Theres interesting comment in there:

// make sure not exceeding acceptable speed

Velocity = Velocity.ClampMaxSize2D(BoundSpeed);

link: UCharacterMovementComponent::PhysFalling | Unreal Engine Documentation

I did see that line, however it appears to just perform the parametrized Flying/Walking/Swimming speed limiting which is working as expected.

 // make sure not exceeding acceptable speed
            Velocity = Velocity.ClampMaxSize2D(BoundSpeed); 

BoundSpeed is defined here:

const float Speed2d = Velocity.Size2D();
    float BoundSpeed = FMath::Max(Speed2d, GetModifiedMaxSpeed()); 

So that looks like the culprit, except GetModifiedMaxSpeed() is just GetMaxSpeed() times a scalar that only cares about crouched movement, and this is the definition of GetMaxSpeed():

float UCharacterMovementComponent::GetMaxSpeed() const
{
    float Result = MaxWalkSpeed;
    if ( MovementMode == MOVE_Flying )
    {
        Result = MaxFlySpeed;
    }
    else if ( MovementMode == MOVE_Swimming )
    {
        Result = MaxSwimSpeed;
    }
    return Result;
} 

And that doesn’t reference Falling at all. If anything it implies that the max Falling speed should be determined by the max Walking speed, which would be sensible (since air control is defined as a fraction of Walking speed) but doesn’t seem to be the case in practice.

Hi SF,

While I am still looking into the hard cap on velocity for a player or world settings, I have found a workaround. Create a physics volume around your world and set the maximum velocity there. You are able to go well above the 4k limit (I took it to 20k). This is at least a way to work around it while we assess this situation. Thank you!

1 Like

That did it! Thank you so much!! I never considered looking into physics volumes, but you’re right it has a terminal velocity parameter clear as day.

The one problem then remaining is the fact that my game is procedurally generated and pseudo-infinite in all directions. Is there a way to make a physics volume global, or to put it in a blueprint that moves with the player?

My guess would be to re-create that volume in-game (if possible) with new, bigger chunks of level. Updating it’s position every tick may not be the best idea performance-wise.

I did this and for some reason, it didn’t work, and now my fp character is not able to shoot projectiles. Anyone know why?

Hey DanzigLucifuge-

Without more information I’m not sure if what your’e experiencing is related to this issue. To prevent details of your issue from being lost in this post, it would be best to create a new post with as much information about your setup as possible. Please be sure to include reproduction steps to help us reproduce the issue locally.