Flying character teleporting downward when near a ceiling

I have a Flying character set up with basic movement controls being controlled by the default player controller. The character is set up to have flying as the default movement.

When the character moves into the edge that connects a wall to the ceiling, the character will sometimes be teleported downwards. This sometimes also results in the character sticking to that height and resisting moving upwards.

Video example:
[Unreal Engine Flying character bug. - YouTube][2]

I am trying to set up the character so that is can smoothly rest in the corner. Have I set up the character incorrectly or is this a bug with the character controller?

I am experiencing the exact same problem in my project. I’m using the AddMovementInput when in flying mode to make my character hover around my level, but when I get myself into a corner, my character keeps teleporting downwards.
This seems to be a result of something in the character movement component, but I can’t work out what it is. Did you ever solve this issue?

When CharacterMovementComponent is in Flying mode, it uses a variable MaxStepHeight in StepUp() that seems like it should apply to Walking movement mode and not Flying mode, which causes sudden teleport downwards of distance MaxStepHeight, while flying and traveling up a wall and hitting a ceiling.

Engine code:
UCharacterMovementComponent::StepUp

float StepTravelUpHeight = MaxStepHeight;

Lowering MaxStepHeight’s value can help fix this behavior, but maybe rethinking the code in UCharacterMovementComponent::PhysFlying’s use of StepUp() might be a good idea, since StepUp() seems mainly designed for ground walking, or at least documentation should be added for MaxStepHeight to point out that it is used while flying in StepUp(), since on first glance it is easy to assume that MaxStepHeight only applies to walking on the ground, when it actually can affect Flying.