0

I have tried using Farseer Physics' OnSeperation event handler, but it's way too sensitive. I want it to wait for the whole off my player's body to leave the area (I'm using an body as an sensor.) not just a small part of it.

  • Maybe you could do something with ray casting? Cast a ray through the area and you can check if it hits the player. Have a look at World.RayCast method. – ayls Nov 02 '13 at 11:06
  • Alright, thanks for the helping. Hopefully it's as easy as I hope it'll be. – user2932566 Nov 02 '13 at 15:34

1 Answers1

1

Consider using two bodies - one "real" body, the same size of the one you're using now, and a second body which is oversized (1.1x-2x the size of the true body) the and only defines an OnSeparation event handler, with OnCollision returning false for all interactions.

You can adjust the "sensitivity" of OnSeparation by tweaking the size of the special OnSeparation implementing body.

user2647513
  • 576
  • 1
  • 4
  • 13