Walking infront and behind objects

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By GodotUser21

I am making a simple RPG game, but I am struggling with the layering of my game. I am unable to walk in front and behind a tree. I tried using a tile map but then there are some empty spaces which make my game look weird.

Thank you

Look up Z-index and Y-sort

Inces | 2022-08-15 16:17

:bust_in_silhouette: Reply From: jgodfrey

Generally, that’s what Godot’s built-in YSort node is for. There’s lots of available info and tutorials online - in both text and video format depending on what you’re looking for.

Just do a search for something like godot ysort or godot ysort tilemap depending on your needs.

Also, the YSort docs are here:


Thank you so much :smiley:

GodotUser21 | 2022-08-15 22:52