This project has moved and is read-only. For the latest updates, please go here.

Suggestion: Event firing for collisions

Topics: Developer Forum, User Forum
Mar 16, 2010 at 1:05 PM
Edited Mar 16, 2010 at 1:12 PM


I just wanted to make a quick suggestion involving geometry collisions.  Basically the idea is to fire events for when two geometries collide.  I looked for this but wasn't able to find an event I could hook up to.

To put this into context, I'm working on a physics based game at the minute which uses Farseer.  I have an object I would like to be notified everytime something collides with it and wanted to use an event for this.  Instead it looks like I'm going to have to pass an array of objects to test collisions against and iterate through them using Geom.OnCollision to check if a collision has occurred.

I have looked at the OnCollision member of the Geom class.  Is there anyway to hook up here?

Any other thoughts on this?