Any Ideas?

Topics: User Forum
Oct 4, 2010 at 7:25 PM

I need a good way to test to see if a character (a FP3 Fixture) is colliding with the ground.

Currently Im looking at using the onCollision and just testing it against all bodies in an array. (the array would consist of all the bodies that make up the floor.)

I'm using this approach because I understand that the 'onCollision' can only be used to test if two specific bodies are colliding. (it would be nice if there was a function that simply returned true if the body was colliding with anything but nothing in particular.)

I get the sense that there is a much better way to go about this. so if anyone has a good idea I would love to hear it.

 

Thanks.

Developer
Oct 5, 2010 at 9:22 AM

Have a look at this thread:

http://farseerphysics.codeplex.com/Thread/View.aspx?ThreadId=227140

Works very well for me and is reasonably fast... i think :)