sticky walls

Hi All,
I am having a physics problem, I applied linear impulse on my objects , enough for them to move really slow but unfortunately if they move really slow, they will end up sticking to the walls (static physics objects as the world limit)

The behavior I want is for the objects to be continually moving at slow speeds but instead I end up with this: http://screencast.com/t/6TkwTAr5CQh object sticking to walls

My attempts:
1. I increased the scale using physics:setScale, but the higher the number, the faster my objects move.

2. I googled and found that I should change velocity threshold on box2d itself, I don't think it's possible in corona?

3. I set all kinds of damping to 0, set the bouncy to 1, friction to 0 (this helps btw)

So how do I move object slowly without them sticking to walls?

But your object is moving at slow speed? Do you want them to stop when colliding with the wall? Or bounce? Or move right through?

I want them to move at slower speed and keep bouncing off the walls without gaining speed.
I move the objects initially by giving them linearimpulse, the lower it is the slower the speed, but at lower speeds, the boxes (objects) will stick to the wall, not bounce, as you can see from the screencast.

Could the sticky walls thing simply be a friction oddity?

Have you tried your walls set to 0 friction?

ChrisL: yes I have and it does help, but it doesn't completely eliminate the problem though.

Perhaps try adding a collision event to the wall (or to the ball), and apply a small amount of force when a collision occurs?

It seems Jonathan posted on the blog about this today

http://blog.anscamobile.com/2011/08/solutions-to-common-physics-challenges/

about 2/3 down the page

I don't know if the problem I'm having is caused by the same issue that triggers your problem described here.

I have posted my sticky wall problem:

http://developer.anscamobile.com/forum/2010/11/10/expose-box2d-velocitythreshold-parameter-help-sticking-objects#comment-51776

To summarize, I have walls with identical physics.addBody parameters (except for a slight difference in shape), and one wall works perfectly fine, while the other one gets my object glued to the wall regardless of the velocity/speed at which it hits the wall. I don't get this, and it makes no sense to me...

Make sure your physics body's shape definition is no more than 8 points and is in a clockwise pattern. If not you will get sticky objects

Wow, Danny, thanks! It worked! Thanks so much for the pointer!

Wow, Danny, thanks! It worked! Thanks so much for the pointer!

@ask no problem :)

views:1821 update:2011/9/27 8:54:05
corona forums © 2003-2011