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

Checking if polygons exist at a given location

Topics: Developer Forum, User Forum
Aug 2, 2011 at 8:07 AM

I am attempting to come up with a solution to a problem. I have a Farseer World that is being drawn onto the screen. What I really need to be able to to is by using a dummy body or otherwise work out if the supplied position intersects any polygons within the world.
To simplify it down for discussion... If we Imagen there are several simulated items on screen and we have a cursor that we can move around on top of everything else.. the question is: Is there an elegant way to tell if that cursor is over a polygon model within the World?
Any pointers would be really appreciated. I am not not necessarily asking for code, I am happy solving that part, more after a philosophy of how others have solved this.
Just a note: using the textures is out of the question as in this instance they have a reasonable amount of transparent pixels around them.
Thanks in advance.

Aug 2, 2011 at 10:32 AM

you can do it with


to get a fixture

or if you need it working for your textures