Make objects bounce?

How would you make so that an object bounces off another object? I kinda got it working but it slows down whenever it bonces off.

I didn’t know today was be-as-vague-as-you-can day.

Ha ha very funny :p. Ok ok, I’m trying to learn how to use the GE better so I’m making simple games, so right now I’m trying to re-create pong, bt the main problem as of right now is the ball bouncing off the paddle. I slows down majorly when it its then stops all together after a bit. I needit to keep going all the time and gradually increase speed.

Thanks

Well, you could make gravity zero.

The best way to do this would probably be to set friction on everything to be 0 and restitution on all of your objects to 1. A value of 1 for restitution basically means that a ball dropped from some height will bounce back up to exactly how high it was dropped from. A restitution of 0 will result in no bounce.

You have to set a material to both your wall object and your ball object. In the material buttons there is a “DYN” button that will show the dynamic properties of that material. There you can set Friction and Restitution.

Restitutions of 2 objects are multiplied together, so if your ball object has a restitution of .5 and your wall object has a restitution of .5 then it will bounce with .25 of the velocity that it hit.

For your use, I’d recommend setting your walls and paddles to have 0 friction and a restitution of 1. Your ball also should have a restitution of 1, but your floor should have a restitution of 0 and friction 0. Make sure you also uncheck “damping” in the gamebuttons.

Here’s an example file, the logicbricks are 100% unimportant, they’re just there to give the ball some starting force.

Attachments

pongBounce.blend (57.5 KB)

Cool thanks a lot.