Ball bouncing of wall

Tags:
1. Aug 20, 2015

Alexander Baine

I am making a game where a ball rolls along the ground collecting coins. The ball is inside four walls. I want to know what the equation for the ball hitting the wall and coming back is. I want the speed and to find the angle aswell. The ball stays at a solid speed of 10 and has a mass of 1 kg. If it helps this game is being made on unity.

Thanks - Alex

2. Aug 20, 2015

RUber

Since speed is conserved, you are ignoring gravity too?
Any bounce should maintain that the angle a made with the wall coming in will be the same as the angle leaving the wall.
In 2d, that means if approach angle =a, departure angle = 180-a.
a=0 describes rolling. a=90 is a straight on bounce and return, ie normal incidence.

3. Aug 20, 2015

Alexander Baine

Ah I see so how would i get the speed of the ball coming off the wall

4. Aug 20, 2015

RUber

You said the speed doesn't change.

5. Aug 20, 2015

Alexander Baine

Sorry not speed how far will it bounce

6. Aug 20, 2015

jbriggs444

If you are ignoring gravity (as you must be in order to have constant speed), it will continue after the bounce until it hits the next wall.