Player hits dropping cube, bounces off and keeps moving?

If my player moves upwards and hits a dropped cube it will continue to ricochet downwards until it hits a wall. If my player hits it from the right, it will continue to move left and so on. The issue doesn’t happen if the player hits a wall.

The only thing special about the dropped cube is it has a Rigidbody attached to it but even if I move right to negate the movement left it will continue moving left when I release the right button? I’ve tried disabling all scripts on the DroppedCube

Any help would be great, thanks.

Hi Daryl,

Welcome to our community! :slight_smile:

Try to create a new Physics Material in your Assets folder by clicking the right mouse button there. Select Physics Material. Increase the friction and add the material to the ground. Start with a rather high friction value so you will hopefully see a significant difference. Then tweak the value until you are happy with the result.

At the moment, the friction on the ground game object (and on all game objects) is 0, which means that the behavious is like ice.

Did adding a material with friction help you fix the issue?


See also:

Thanks Nina but don’t worry! I kept going with the videos and a few videos later the Tutor mentions this happens on his version too and that it’s a bug. I just noticed it earlier and thought I had done something wrong!

The idea of my player being on ice has made it all click together for me -The RigidBody component is creating a force which pushes my player away from an object but my movement code is essentially just warping the player by a certain number of units in a given direction when a button is pushed. This “movement” by tweaking the coordinates never does anything to explicitly counteract the force that’s been applied. That’s why if it ricochets right and I push left, it does jump left but the force is still pushing it right. Please correct me if I’m wrong!

Thanks for all your help!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms