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

Count Fixtures (bodies) overlapping with a movable rectangular area

Oct 7, 2010 at 7:47 PM


I want my program to count the number of fixtures (bodies) overlapping with a rectangular movable / rotatable area defined by a fixture for collision avoidance purposes. The obstacles (bodies) have different irregular shapes, each one consisting of a large number of square fixtures.

I tried to implement this by using Farseer collision detection (BeginContact, EndContact ...) but it doesn't work. (The "sensor area" should not collide with any of the obstacles but it should be possible to register and follow up the contacts somehow. CollisionResponseEnabled = false doesn't work with  Farseer 3.0.) BtW: I know there's a function to check if a point overlaps with a fixture ...

Any suggestions?

Jul 21, 2014 at 9:42 AM
Make the "sensor area" a farseer sensor by setting IsSensor = true, then it will register collisions without colliding.