Physics Modes Always Assume Walking?


I’ve been reading through the code and am starting to implement some creatures with different physics. What I’ve noticed is, the engine always seems to like to default characters back to MOVE_Falling and MOVE_Walking regardless of what variables you set. For example, if you set DefaultLandMovementMode, that’s only ever used if you call SetDefaultMovementMode explicitly which almost never happens. Looking at the code, you may be able to fix this at the engine level. In CharacterMovementComponent.cpp, there is the following code:

else if (MovementMode == MOVE_Falling)
    if (CurrentFloor.FloorDist <= MIN_FLOOR_DIST)
        // Landed.

Can we replace that with SetDefaultMovementMode()?

Likewise with SetPostLandedPhysics, where it assumes again if you’ve landed you’re going to MOVE_Walking?