Unity Rigidbody player climbs up building corners when moving forward, how do I fix this?
Hi everyone,
I'm making a first-person horror game in Unity 6 and I'm having a strange collision issue with my player.
My player uses a Rigidbody, Capsule Collider, and Rigidbody.MovePosition() for movement. Whenever I press W and push the player against the corner where two building walls meet, the player starts sliding/climbing vertically up the corner, almost like Spider-Man. The player's Y position rises from around 2 to 3–4, and when I release W, the player falls back down.
This happens at pretty much every building corner. I want the player to collide with the walls normally instead of climbing them.
What could be causing this? Is it a Rigidbody collision-resolution issue, the Capsule Collider, or the building colliders? What's the recommended fix without completely rewriting my movement controller?
Thanks!