overriding a collision shape with another collision shape.

Godot Version

v4.2.1.stable.official [b09f793f5]

Question

I have a gate that I imported from blender. I am trying to make it so it collides with the player but the part with the door does not collide with the player when when it is opened and allows the player to pass through (the gray part is the door, it opens up like a garage door)

My current approach is to use two area3ds where one collides with the player and the second will allow the player to pass through the gate by overriding the first area3ds collision where they overlap. Is this something that is possible
cutting a hole through the gate seemed more effective than using a bunch of collision shapes to cover the entire frame.

Thanks in advance!

You can use Godot to generate a collision shape that precisely matches the faces of the corresponding MeshInstance3D. This isn’t a very suitable method for highly complex shapes, but in the case of such a simple gate, it won’t have any negative impact.

Just select the MeshInstance3D node and use Mesh > Create Collision Shape in the 3D Editor. Choose Trimesh in the following dialog window, and the shape with the hole will be generated.