check which instance of a physics object, if any, is at a point

Dustin

Member
Functions like instance_position and collision_point can are for non-physics objects and ignore fixtures (one workaround is to enable pixel-collision checking to get a processor-intensive approximation of fixture collision checking).

physics_test_overlap works with physics fixtures but won't tell you which instance it sees.

The only solution I can think of:
1. Make sensor fixture identical to the regular physics fixture and on top of all instances of the physics object I am interested in.
2. Use the "collision" event of an invisible test object to test for collision.
3. Move test object outside the level and back again for future tests so that the "collision with sensor" eventcis reset and can trigger again

The problem is that I would have to manually enter the fixture points in code, then edit the code whenever I change it so the physics & sensor fixtures stay identical.

Any suggestions?

Dustin
 
Last edited:
Top