Mouse geometry multiple collision detection.

Topics: Developer Forum, Project Management Forum, User Forum
Mar 20, 2008 at 7:13 AM
Firstly let me say, I love Farseer physics and I have had a blast developing my game with it. It is very well coded and easy to understand and pick up quickly.

I have a simple problem that I am trying to figure out the best solution to. What I want to do is create a Circular Geom around the mouse cursor on an event. I then want to attach a Fixed Joint to origional cursor point and any Geom that collides with that mouse circle.

I can immediatly see two different methods to accomplish this goal, run the intersects method for every point in the mouse circle, but that would be a very expensive process. The second method I envision is providing a delegate function to the CollisionHandler method. However as far as I can tell that only works with two geoms, and I need to find all intersecting geoms.

I am having trouble trying to figure out how I can accomplish this but feel confident that it is possible with Farseer. All help is appreciated.
Coordinator
Mar 20, 2008 at 5:40 PM
you should be able to setup a call back on your MosueCircle. It will be called everytime another geom collides with it.