Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I register the ContactListener in XNA? In the box2d manual is written:

9.4 Contact Listener ... At run-time you can create an instance of the listener and register it with b2World::SetContactListener. Be sure your listener remains in scope while the world object exists.

How can I do that? I want to use PreSolve to disable collision between the character and some tiles.

share|improve this question

Problem solved with:

world.ContactManager.PreSolve += new PreSolveDelegate(PreSolve);
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.