Subtracting Collision shapes 2D from each other

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By rustyStriker
:warning: Old Version Published before Godot 3 was released.

I want to make a responsive area that can be changed for a short duration by using a spell, my question is can I remove/subtract a part of a collision shape 2d with another collision shape 2d or through code, in order to make a temporary pit in the ground?

:bust_in_silhouette: Reply From: eons

First, if 2.1, you should work with Shapes not CollisionShapes.

Then if you want to overlap zones you can try to do some polygon operations on the original shape, then triangulate all the concave polygons and…


Better why not just add an Area on top that fakes the pit and affects everything within its shape?

Well, The area thing sounds really clever, and i want to be able to do it on different nodes, using the inspector to create the level and design it, and just be able to let the player create those pit holes where ever he wants

rustyStriker | 2017-10-22 16:25