- Home /
Other
Make a hole in a collider
Hey guys, i'm making a game based in the black and white color. I want to make a platform (the white square you see in the Scene) that moves and make a hole in the Composite Collider 2D you can see in green (Case A). I want to make that when this white platform enters the black zone, it keeps the collider as a box (Case B). And when it's full outside the black zone, it has no collider (Case C). I cannot make multiple colliders, remember that the white platform you see, moves.
Like a bubble of air in the water, but with colliders. (see the second image)
What i have:
This is what i expect to make with the A,B,C cases i explained:
Some ideas? I have to say i'm really new in unity. I was only 3 weeks sice i started learning unity but I have to say i know how to programe in java.
Thank you!
Answer by FlorentAlbyon · Aug 10, 2020 at 03:15 PM
You'll have to use multiple colliders for this. Just arrange them in a way that creates these holes.
But is a moving platform, i need to make a hole while moving in the collider. ._.