Box sweeping gives a completely wrong normal

Hi there,

it seems box sweeping gives a wrong normal when it collides against BSP.

The video shows FloatingPawnMovementComponent with Box collision sliding along a box-shaped BSP. The movement stops even though the BSP doesn’t have any obstacles. After that, I set a breakpoint with the condition “Hit.Normal.Y != 1.0f && Hit.bBlockingHit” and it turned out that box sweeping gives a wrong normal to FHitResult.

Does anyone know how to fix this issue so that Pawn movement with Box collision can get right normal for collision response?

The project in the video is from GitHub - kneltbuffalo/FloatingPawnStuck. You can compile it with UE 5.4.2 and try it out for yourself. I just swapped a sphere collision component which FloatingPawnMovementComponent uses with Box component.

If you want to set a breakpoint in the video, the line is https://github.com/EpicGames/UnrealEngine/blob/5.4.2-release/Engine/Source/Runtime/Engine/Private/FloatingPawnMovement.cpp#L66

Thanks

I added a function which replicates the wrong normal situation in my project. The video shows the debugging the collision calculation using breakpoints.

(I updated my project and you can debug them if you want)

It looks like VectorEPA which returns MTD is doing something wrong? VectorEPA is called in this line https://github.com/EpicGames/UnrealEngine/blob/5.4.2-release/Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/GJK.h#L1848

Also the fact that OutTime gets less than or equal to 0 feels strange. Shouldn’t it have the other value than 0 because it should have collided against the BSP?

I’m sorry that I didn’t included the scene which the final result of OutTime in the video, but you can check it by setting a breakpoint at https://github.com/EpicGames/UnrealEngine/blob/5.4.2-release/Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/GJK.h#L1725