Collide with no physical influence?

Mar 2, 2011 at 4:47 AM
Edited Mar 2, 2011 at 4:51 AM

Whats the easiest way to make an body collide with other bodies but only for the purposes of the detection? rather than the physical reaction? 

i.e. everything works as normal, OnCollision can still be used an everything it just has no physical influence

 

I have a feeling I've seen something literally called a detector somewhere in the engine or documentation but can't seem to find it and just being pointed in the right direction would be a great help, thanks!

Mar 2, 2011 at 9:55 AM

What you need is probably a sensor. Just give to the fixture the property IsSensor to true.

Mar 2, 2011 at 12:30 PM

can i add a qeustion of my own?

i tried the sensor option.. and i have a weird problem.

if i want to remove and item if it touches the sensor there is a problem that if the sensore moves to fast i can hit twice and than my function tries to remove the body twice... is there a way around it?

Mar 3, 2011 at 1:49 AM

sweet, works perfect thankyou