- Home /
Running into corners causes player to slowly rise
When the player repeatedly runs into a corner, like of a room or a corner created by objects, they slowly start glitchily rising up the wall or object. The game is an FPS, and there's no jump button, but the level has stairs and slopes, so locking the player's Y position isn't an option.
I believe the issue has something to do with gravity. I have a downward 50 force attached to the player, to increase the speed at which they fall, even without it, however, the problem still occurs, and only when there are no Y forces acting upon the player does the problem not occur.
How would I go about fixing this?
Could you post a vid or a gif if this in action? Help is on the way!
The camera is pointed at the ground, you can see it become darker as the draw distance increases as the player rises.
Hmmm, can you post a picture of the inspector of your player?
Answer by AsAnAsterisk · Sep 21, 2017 at 12:05 AM
After messing around with the physics, it turns out that increasing the Default Solver Velocity Iterations fixed the problem (was 1, now 12) and i no longer increase in y-position when jittering in a corner.
Answer by connorwforman · Sep 05, 2017 at 10:52 PM
Add a second collider above where the rising starts, so it is blocked from rising.
Answer by shadowpuppet · Sep 09, 2017 at 02:40 AM
are the corners mesh colliders? I find that my player can go through them half way and hang or climb like yours is. Making it a box collider fixed it. If NOT mesh collider then maybe try angling the box collider inward toward the play area? Else, a roof collider like connorwforman said