This project has moved and is read-only. For the latest updates, please go here.

Arcanoid behaiviour and bounce

Topics: Developer Forum, User Forum
Jul 12, 2010 at 8:30 PM
Hi! I'm making arcanoid like game. I'm setting walls as static bodys,setted friction and drag to zero and apply impulse to ball when firing it. But i wanna to add not static walls to game. Like when ball hits it - wall is moving like box in real world. I set IsStatic to false to wall, but i got that ball is losing its speed, so such ball behaiviour is not suitable for me. What parameters should i set to dont let my ball lose its speed when bouncing from nonstatic object. Thanx! =)
Jul 14, 2010 at 6:34 AM

You're going to have to find the right balance for that.  Restitution is going to affect the bounciness, while modifying the mass of your bodies will also have a large impact of which pushes which around.  If you use FP3, though, you can set your ball to be a Kinematic body, and then it won't be affected at all by other dynamic objects.  That might be exactly what you are looking for, but then again, it all depends on how you see it reacting in your mind.  I've seen aracnoid clones where the ball plows right through the blocks, and others where it just bounces like crazy.  Someone else with a deeper understanding might be able to help more than I.