+1 vote

How would i overlay images onto a tile map such that an image is only visible on its respective tiles and transparent everywhere else. I attached an image to hopefully explain what i'm trying to do more clearly.

I would greatly appreciate any help on this, thanks! :)


Godot version 3.5.1
in Engine by (15 points)

While testing I thought this method wasn't actually working but it does. There is probably a better way. However here is one way to do it.

Add a texture rect as a node above the tilemap that will show the picture.
Select the tileset for that tilemap and select each tile that will 'show through' the picture below and set its z value to -1.
Those tiles will be drawn behind the texture rect.
Here is an image with a single grass tile showing through the texture below. Note that this is only one tile from the set that gets drawn behind the image.

Technically, I suppose this answers the question "How do you underlay an image under a tilemap" but the outcome seems to be the same.

Please log in or register to answer this question.

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 Frequently asked questions and 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 [email protected] with your username.