1
\$\begingroup\$

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.

http://www.box2d.org/manual.html#_Toc258082975

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

\$\endgroup\$
2
\$\begingroup\$

Problem solved with:

world.ContactManager.PreSolve += new PreSolveDelegate(PreSolve);
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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