0 votes

Godot 3.2 BETA 4


I'm creating a sliding door for a maze. I want to be able to raise/lower the door without it spilling into the surrounding parts of the maze since the maze walls are quite thin. A little searching shows that Control nodes have the ability to clip content to their rect, but controls are drawn above other elements. I need my door to be behind other elements on the tilemap.

Is there a way of doing this with a regular node that I can position in the scene tree as needed. The door itself will be an Area2D to detect collisions when the door isn't open. Therefore the "invisible" part of the door would need to be unreactive to any collisions and not just transparent.

Any ideas would be appreciated. Thanks :)

in Engine by (372 points)
edited by

1 Answer

0 votes

You can put your Control node inside of Node2D. Then you can use the Control ability to clip content (your Area2D) and the Node2D to control its Z index (or just move it below your wall nodes in scene to put it behind).

by (14 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.