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? [import]uid: 11334 topic_id: 6390 reply_id: 306390[/import]

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? [import]uid: 30185 topic_id: 6390 reply_id: 22150[/import]

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. [import]uid: 11334 topic_id: 6390 reply_id: 22202[/import]

add your +1 here
http://developer.anscamobile.com/forum/2010/11/10/expose-box2d-velocitythreshold-parameter-help-sticking-objects [import]uid: 6645 topic_id: 6390 reply_id: 22467[/import]

Could the sticky walls thing simply be a friction oddity?

Have you tried your walls set to 0 friction? [import]uid: 36959 topic_id: 6390 reply_id: 22576[/import]

ChrisL: yes I have and it does help, but it doesn’t completely eliminate the problem though. [import]uid: 11334 topic_id: 6390 reply_id: 22629[/import]

Perhaps try adding a collision event to the wall (or to the ball), and apply a small amount of force when a collision occurs? [import]uid: 52430 topic_id: 6390 reply_id: 49567[/import]

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 [import]uid: 31262 topic_id: 6390 reply_id: 49642[/import]

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… [import]uid: 67217 topic_id: 6390 reply_id: 51777[/import]

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 [import]uid: 84637 topic_id: 6390 reply_id: 51781[/import]

Wow, Danny, thanks! It worked! Thanks so much for the pointer! [import]uid: 67217 topic_id: 6390 reply_id: 51800[/import]

Wow, Danny, thanks! It worked! Thanks so much for the pointer! [import]uid: 67217 topic_id: 6390 reply_id: 51801[/import]

@ask no problem :slight_smile: [import]uid: 84637 topic_id: 6390 reply_id: 51802[/import]

I wanted to resume this thread, as I am having a similar problem. I have a static body that is defined with four points (a “downward” sloping rectangle - i.e. an obstacle) and a ball falling from the top and hitting the obstacle. The ball is supposed to slide down the obstacle and continue its fall.

If inclination of such obstacle is left to right (and object is defined clockwise) the ball slides down. If inclination of such obstacle is right to left (and object is defined clockwise) the ball sticks to it and stops completely, regardless of any change in parameters for either the ball or the obstacle.

Now, if the object is defined counterclockwise, the opposite happens (the ball sticks to the top of the obstacle when the obstacle has a left to right inclination).

I am only testing Corona and I admit I am not familiar with it. I would like, however, to try and understand what is going on. [import]uid: 159908 topic_id: 6390 reply_id: 113841[/import]