# Rigidbody bounces back on collision

Hello everyone, I have a scene with a player (capsule collider + rigidbody + camera + my movement script) and a cube (cube collider + rigidbody).

Every time that the player walks and join a collision with the cube it bounces back if the cube doesn’t have space to move in the direction that is being pushed

Here is a video showing the bouncing 2020 05 03 02 38 22 - YouTube (when i go back im not pressing any button, its just the bounce)

I don’t want this to happen, i just want that if the player is moving the cube and it has no space it just stops moving, that bouncing is annoying and i dont know how to remove it. Can someone help me?

Tganks in advance guys.

Did you try to increase the drag or increase the mass of the player?

Without seeing your scripts, i think i have an idea of what is happening. This has nothing to do with any kind of bouncing mechanics from the rigidbody or any other component. If you wrote the script yourself, you should be able to find it quite quickly. To stop a rigidbody from forever adding a force when walking into a wall, you could add a directly opposite force to stop the character from accelerating forever. Without being certain, i think this opposite force is being added wrongly.

This could also be a case of the rigidbody of the cube acting weird when colliding with the wall. It could be shaking every so slighty, and adding a force back to your player. The Rigidbody physics can be very “wonky” at times.

Increasing the drag of your Rigidbody could greatly reduce this i believe, but it would not really make the problem disappear, just simply reduce the problem. But try looking at the rigidbody component. Right under the “Mass” you have “Drag” which rougly translates to the friction between your character and the ground. Perhaps also try increasing the masses of your objects to more realistic scales, such as 100 for the player and 10 for the cube. That could potentially also stop any weird physics studdering.

If this is not the solution, please do share a link to your script, so we can get a peek at the movement