Hello,
currently I'm implementing a platformer using Box2D. I know Box2D isn't regarded as the best choice here, but the game has some physical effects I could hardly realize without a physics engine.
The game works pretty well so far, however one Problem I never could really solve: How to prevent a body having multiple fixtures getting stuck at static bodies?
The picture here explains the problem : http://postimg.org/image/ary4ln4m1/
The player consists of a large rectangle (friction=0) and a circle (friction=1). With this setup I can prevent the player getting slowed down when touching a wall while falling. The circle below is the result of testing different fixture setups for the player, and with that one I could minimize the number of time I've been stuck at static edges.
I already have an algorithm merging tiles into larger static bodies. So inbetween tiles I never have problems. The problem occurs only at edges as shown in the picture. The circle fixture and the rectangle fixture have the same width, but sometimes the situation shown in the picture still occurs.
So generally I'd wanted to ask:
What is the best fixture setup for a typical platformer character?
Are there any common tricks in detecting and solving such situations?
Thank you in advance...
currently I'm implementing a platformer using Box2D. I know Box2D isn't regarded as the best choice here, but the game has some physical effects I could hardly realize without a physics engine.
The game works pretty well so far, however one Problem I never could really solve: How to prevent a body having multiple fixtures getting stuck at static bodies?
The picture here explains the problem : http://postimg.org/image/ary4ln4m1/
The player consists of a large rectangle (friction=0) and a circle (friction=1). With this setup I can prevent the player getting slowed down when touching a wall while falling. The circle below is the result of testing different fixture setups for the player, and with that one I could minimize the number of time I've been stuck at static edges.
I already have an algorithm merging tiles into larger static bodies. So inbetween tiles I never have problems. The problem occurs only at edges as shown in the picture. The circle fixture and the rectangle fixture have the same width, but sometimes the situation shown in the picture still occurs.
So generally I'd wanted to ask:
What is the best fixture setup for a typical platformer character?
Are there any common tricks in detecting and solving such situations?
Thank you in advance...