How to add a TileSet (or TileMap) background?

joinedjoined Posts: 10Member
in 2D

Hi to all, I need to add a TileSet background, but not a statically one, but one able to scroll just as the TileSet done.

Any help?

Best Answer

  • joinedjoined Posts: 10
    Accepted Answer

    I solved using 2 different TileMap/s, one for the Background and one for the Foreground! :)

Answers

  • TwistedTwiglegTwistedTwigleg Posts: 2,655Admin

    You need a tileset for the background? I think you can just set the z_index of the tileset to a negative number, and then it should be drawn behind all of the other Node2D-based nodes, while still functioning like a normal tileset. You may also need to disable collision though, unless you want your entities to collide with the background, but there is probably a way to do that as well.

  • MegalomaniakMegalomaniak Posts: 2,645Admin

    I wonder. Might the parallax background be of interest perhaps?

    https://docs.godotengine.org/en/stable/classes/class_parallaxbackground.html

  • joinedjoined Posts: 10Member
    Accepted Answer

    I solved using 2 different TileMap/s, one for the Background and one for the Foreground! :)

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file