box2d circular body stuck in corners

  ... the Physics Box2D Extension for AndEngine.

box2d circular body stuck in corners

Postby giorashc » Sun Feb 26, 2012 5:14 pm

Good day, I have a circular body which rolls in a certain direction. Some platforms in my game are built perpendicular to each other forming a 90 degrees corner like _| (without the gap :)) My problem is that the circular body gets stuck between the two platforms if it collides with the corner. Only by implying an impulse the body is released but gravity does not seem to affect it anymore.

I have seen posts with solutions but they were all referring to square character bodies.

Has anyone here have a suggestion about this issue ?

Thanks
giorashc
 
Posts: 1
Joined: Sun Feb 26, 2012 5:12 pm

Re: box2d circular body stuck in corners

Postby tauame » Thu Mar 15, 2012 7:24 pm

i had this issue when i setted "allowSleep" to true inside the PhysicsWorld constructor:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. new PhysicsWorld(new Vector2(0,
  2.                                 SensorManager.GRAVITY_EARTH), true);
  3.  
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


setting this last parameter as false fixed that to me.

in the end I got something like this:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.     new PhysicsWorld(new Vector2(0,
  2.                                 SensorManager.GRAVITY_EARTH), false);
  3.  
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
tauame
 
Posts: 6
Joined: Thu Mar 15, 2012 4:06 pm


Return to Physics Box2D

Who is online

Users browsing this forum: No registered users and 8 guests