is there a way to find if a body is completly contained?

Mar 7, 2011 at 10:00 AM

is there a way to find if a body is completly contained?

meaning i have a small circle as sensor and i want to find out not only if he collides with a bigger circle but if it completly inside...

thanks in advance

ER

Developer
Mar 29, 2011 at 10:52 AM

Depends heavily on your situation. If we are just talking about circles of a fixed size here, just make your sensor smaller by the amount of the diameter of the circles you are testing against. For polygon shapes you could extract the vertices, loop through them and test them against the sensor via TestPoint. Checking manually if one circle is contained within another isn't to hard either.