Player keeps moving when it hits an object

I have noticed one other problem and I think it has to do with physics and momentum. If I bump into a wall, everything works as it should. the player will remain stationary unless I use the move keys (WASD or arrow keys) to move the player. But, it I hit the object that is dropped, the player will move in the opposite direction to the direction the player hit the object. It is very slow but it would continue if left unchecked or moved but it still will have that inertia until it hits another object in the playing field. I am sure there is a setting to dampen that motion but I don’t know what it is. Hitting the wall after hitting the dropped object doesn’t stop the players movement only hitting the other object in the playing field cancels that movement.

I know we are learning simple things at the moment but this action seems a little beyond that.

Thanks

Hi Richard,

You could try to create a Physics material in your Assets folder, give it some friction and assign it to the ground collider.

Thanks Nina but actually Rick answered this question in the next lecture. And as I had suspected, we are using a simple setup to move things around and not using physic properly. So, weird things do happen in this simple game.

The problem is not really a problem but caused by the simple way we have set up the script. I am OK with that as it stands.

Again, I really appreciate the help and also appreciate that this course is monitored so well!

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

Privacy & Terms