I have an irregular object (made of overlapping circles and squares) and I want to have objects bouncing around inside the irregular object. Is there a way to create a ‘wall’ around the outside of the object?
I can make circles and squares as walls, but then cannot ‘erase’ the parts that overlap.
With complex geometry I can use drawLine around the outside changing direction when I hit an overlapping part, but that gets really complex with ‘arms and legs’ sticking out.
I tried save and then load the saved image as an outline, but that detects collisions from outside, not from inside.
I tried objects approaching from the outside to detect the edge, but then it doesn’t detect holes in the middle, and I would have to figure how to to connect the points (possible, but not practical, I think).
If it helps, the background is solid color.
Is there a way to find the outline and make a physics body (static wall) of the complex outline?