Summary of problem:
- I have an object with a circular radius of effect
- As it gets close to objects, I want them to disappear, but only the overlap between the circular area of effect and the object.
- I also want to disable the colliders for the vanished bits.
Any thoughts on how to do this? My preliminary ideas are:
-
Since this is a 2D game, I can do depth tricks. For example, I can move the objects a few meters backwards and overlay a circularish chunk in front of them. I could make this chunk a trigger with scripting that disables colliders while things are inside it, so objects can move through.
-
I can hide the object completely and replace it with very small tiles that vanish when they’re in the area, temporarily.
Ideally, though, I’d just like to specify the areas to wipe away, and have the collider mesh and the rendering area disabled for that part (and come back when the area of effect object leaves).
Any insights would be greatly appreciated