Wednesday, 15 September 2010

Box2D Contact Filter not triggering for bodies created on top of other bodies -



Box2D Contact Filter not triggering for bodies created on top of other bodies -

i have box2d setup android game, using port libgdx.

i'm using contact filter allow bodies pass through each other. however, when create 1 such body @ location body occupies, overlap, 2 bodies stuck, , contact filter never called. if bump 1 object loses contact , comes contact other body, pass through each other expected. however, have bodies pass through each other beginning.

i've noticed behavior 1 dynamic body , 1 dynamic, static or kinematic body. total setup complicated, don't know source benefit anyone.

my main question whether sounds normal box2d behavior (and if if knows work around). on other hand, if have done similar without getting problem, know can bugs might causing programme run differently.

thanks help!

solution utilize collision filtering via b2fixturedef::filter field instead of contact listener.

box2d

No comments:

Post a Comment