Hello. I have posted this elsewhere but I haven't had any feedback from this. I was hoping posting here to the Box2d experts may provide greater enlightenment
I am using a contact listener to work out when two fixtures collide. This is working as expected.
What I am attempting to do is flag up if three objects collide. An example of this would be only flag a collision if three tiles are touching each other in some sort of 'chain'. I am unsure the best way of doing this and wanted to ask if there is already a standard approach.
Is it possible to simply check if an object is touching anything else? I have looked through the API but can't seem to find anything. If this is possible I could recursively loop through each of the 'collided/connected' objects and notice a three point collision if I end up recursing through three objects.
Thank you
I am using a contact listener to work out when two fixtures collide. This is working as expected.
What I am attempting to do is flag up if three objects collide. An example of this would be only flag a collision if three tiles are touching each other in some sort of 'chain'. I am unsure the best way of doing this and wanted to ask if there is already a standard approach.
Is it possible to simply check if an object is touching anything else? I have looked through the API but can't seem to find anything. If this is possible I could recursively loop through each of the 'collided/connected' objects and notice a three point collision if I end up recursing through three objects.
Thank you