I’m experimenting with the Game Animation Sample Project and playing around with how Motion Matching and GASP behave in different setups. I’ve managed to get a decent first-person mode working, but I’m having trouble with wall collisions.
The issue is that when the character runs into a wall, the head (and thus the camera) clips through it, which obviously breaks the experience in first person.
To try to fix it, I implemented some logic in C++ using GetWorld()->SweepSingleByChannel to run a set of sphere traces around the character. The idea was to detect nearby obstacles and cancel movement input when hitting a wall, based on the impact normals. It does detect obstacles and partially blocks movement, but the results don’t feel very natural — the character still leans slightly into walls and doesn’t convincingly stop.
Has anyone run into the same issue, or found a better way to prevent this kind of clipping when using GASP and motion matching in first-person?
It does works well to prevent basic clipping, but if you run into a wall and shake the mouse, you can still clip your head through. So if anyone has ideas to improve this, I’m all ears.