Get Rid of Bouncing

Say you have a tower built out of physics shapes. If you build high enough or use enough individual bodies, eventually you will have problems with the tower wobbling or bouncing. This will get out of hand and cause the pieces of the tower to start sliding out of place and even causing the whole tower to fall.

How can I eliminate bouncing in Corona? I have tried setting the bounce to 0 but it horrible compared to box2d's tradition restitution = 0.

Have you tried increasing the density and/or friction of your tower objects? This is probably too obvious, but worth a try. It might not even be what you desire, but if you can increase friction to prevent "sliding", versus the entire tower collapsing, then I'm sure greater friction would be the desired option. Higher density might also make each object heavier in general, thus preventing them from "bouncing up" by tiny degrees and destabilizing the structure.

I'm curious about what you find out (if anything) because my current game in design might involve some fairly big tower constructions, and I don't want the same kind of bouncing/sliding behavior occurring. So please report back on your experiments, I'd appreciate it!

Brent Sorrentino
Ignis Design

Increasing the density and friction is not so much obvious as it is difficult to get working properly. Setting the densities to all the same integers for all the pieces instantly gets rid of the problems, but every piece isn't the same. If I am building a tower, it needs windows, wooden beams, stone, etc. Having the same densities for stone and glass, just won't work. Then lets say, you have to hit a switch or something with a particular piece. If the weight of the switch is set to stone, but every piece weighs as much as stone, then every piece could flip the switch.

So with density, its finding the right threshold in which you can still having unique differences between pieces. If it's too large between pieces, then the bouncing returns. This occurs even with a bounce of 0.00001 and 0. (I seriously need someone to check and see if bounce = 0 is even valid)

Concerning friction, how high does friction have to be??? I have bodies with densities at 1 with frictions from 100 to 400. Friction forces don't act like I thought they would. I thought frictions this high would stop the bouncing. Frictions only seem to effect simple things like giving traction to round objects and stopping pieces from sliding down hills. I will try boosting it some more just to see what happens.

I think I might hit a wall with the threshold, and will then have to come up with more elaborate solutions. I will keep you posted.

views:1342 update:2012/1/9 8:53:30
corona forums © 2003-2011