1
votes

I have dynamic bodies that I want to trigger an event using ContactListener when they collide with the player. The problem is that I don't want the player (FYI, the player is dynamic too) or the dynamic bodies to actually effect each other with physics (eg push each other on collision). I want them to simply pass over each other. Is this possible? I tried using filters, but setting them to different filters doesn't trigger the contactListener when they collide. Thanks!

1
I haven't used Box2D, but it looks like you probably need Sensors.EvilTak
Could you delete your last question since you asked this question?Jonny Henly
@JonnyHenly It's not the same asker, is it?EvilTak

1 Answers

1
votes

You have to set "isSensor = true" in your FixtureDef

e.g.

FixtureDef fdef;
fdef.isSensor = true;