Physics bodies lose velocity after collisions

Hi,

I am pretty new to Corona and am making a simple app where the user will pop bubbles floating around the screen. I’m having trouble with the movement of the bubbles. They move correctly at first, but after a few collisions they slow down and get stuck in corners. I have already tried

[lua]b.isSleepingAllowed = false

b.linearDamping = 0[/lua]

but this does not seem to work. Gravity is set to 0 as well. Any help would be appreciated, thanks in advance.

do bubble collide and move other bubbles?  If so, this is correct behavior.  One bubble is losing momentum to another bubble.

If you want to maintain velocities you’ll need to do in manually.

Download my repository of free stuff:

https://github.com/roaminggamer/RG_FreeStuff

then, look at the example in:

~\RG_FreeStuff\AskEd\2015\11\bouncy

https://www.youtube.com/watch?v=H2WXQUP6pL4

EDIT: Found the problem and it has been fixed. Thanks for the help, your code helped a lot. 

@roaminggamer Thank you, that has solved the speed problem. Now however there is an issue whenever the user pops a bubble and a new one is created. 

do bubble collide and move other bubbles?  If so, this is correct behavior.  One bubble is losing momentum to another bubble.

If you want to maintain velocities you’ll need to do in manually.

Download my repository of free stuff:

https://github.com/roaminggamer/RG_FreeStuff

then, look at the example in:

~\RG_FreeStuff\AskEd\2015\11\bouncy

https://www.youtube.com/watch?v=H2WXQUP6pL4

EDIT: Found the problem and it has been fixed. Thanks for the help, your code helped a lot. 

@roaminggamer Thank you, that has solved the speed problem. Now however there is an issue whenever the user pops a bubble and a new one is created.