Hello everyone,
I have two objects, like the red and blue circles in the attached image, and an obstacle like the brown shape. The circles need to move from A to B but only the red circle can destroy the brown material. The blue circle can move only over white background, so it collides with the brown shape and can only follow the path the red circle cuts.
My first idea was to use tilemaps, but I would have to use really small tiles to achieve a smooth margin. This means the number of tiles will increase and I’m thinking this will have a performance penalty.
My second idea was to use masking with a stencil buffer. But that won’t give me collisions for the blue circle.
Next I thought I could combine the two, use invisible tiles big enough to have a reasonable count, but small enough to be able to approximate the shape of the tunnel. And over that, paint the smooth margin as resulting from the stencil buffer mask.
How would you do it? Is there a better/simpler way?