Bouncing gets crazy
Hunnenkoenig
Member Posts: 1,173
I make a wallbreaker game.
After many MANY tries and different settings I have set the ball's settings so:
Density 1
Friction 0
Restitution 0
All bricks and walls and other objects, the ball should bounce off, have the settings so:
Density 0
Friction 0
Restitution 1
It works fine, but no matter, what I do, the ball sometimes gets crazy.
Mostly when it is bouncing between 2-3 objects in the shortest time (3 bricks near eachother)
The ball speads up and is bouncing like crazy until it goes off the screen and I get a new ball.
It seems, it is a bug... or do I do something wrong?
(please remember, I already tried all kind of settings for the above mentioned attributes)
After many MANY tries and different settings I have set the ball's settings so:
Density 1
Friction 0
Restitution 0
All bricks and walls and other objects, the ball should bounce off, have the settings so:
Density 0
Friction 0
Restitution 1
It works fine, but no matter, what I do, the ball sometimes gets crazy.
Mostly when it is bouncing between 2-3 objects in the shortest time (3 bricks near eachother)
The ball speads up and is bouncing like crazy until it goes off the screen and I get a new ball.
It seems, it is a bug... or do I do something wrong?
(please remember, I already tried all kind of settings for the above mentioned attributes)
Comments
I only played with this stuff briefly a few weeks back (since my current game doesn't really use much of it). So other may have more proven settings/methods.
Also, isn't there a brick game template to look into? (at work on a PC so I cannot readily check)
Density doesn't do much if the objects are not movable. I tested them around.
If I set the ball's density higher, then it gets heavy and slows down. As I said, it works as intended, but it gets crazy only some times without any reason.
There is a brick game template, but it is a crap to be the honest. It has many flaws, like this, just even wors. It is a very very basic template and rather useless.
I didn't notice the max speed attribute :-)
Now it seems to work, but I still have to test in GS and on the iPhone.
Thanks!
I also restarted my laptop and iPhone. Maybe I had too few memory or such and that's why it got jerky.