How to make bouncing circles, like in arkanoid, but in whole screen (walls on the top, down, righ and left. And how to make them bounce off each other? Tried with bullet behavior, but it doesnt do it right. Any ideas?
Develop games in your browser. Powerful, performant & highly capable.
If you use the bullet behaviors action, bounce of object it should work,
do something like this:
Object1.onCollisionWith(Object2)
->Object1.BounceOfObject(Object2)
->Object2.BounceOfObject(Object1)
Or just use the physics behavior
I've decided to use physics, but how to prevent circle go crazy after a few collisions? :D
here's CAPX
You could either set the friction of the floor to something like 15 or simply set the restitution of the ball to a lower value.
changed, still same problem.. can someone post fixed cap?
CAPX
OK, I changed the collision mask of the ball to circle - that helps the bounce to angle correctly. Then I changed the Elasticity to under 1.0 (you had 1.4) - This helps it bounce a little less each bounce. I also reduced the size of the image ball, and centered the origin point didn't fix anything, but it is a good practice... http://www.box.com/s/f7nhqiuc7xhlxzld6p9m
Adjust the elasticity of the ball to 0.95 or something like that to make it REAL bouncy, but still calm down after a few seconds.
The problem is that I want them to move without stoping and boucing off every wall.How to do that? :D
Add an impulse to the ball each time it collides with a wall.