[ad_1]
I’m trying to create an isometric tilemap world in Godot 4 beta 4. The world is made of blocks on top of each other where for every Y level (thinking the world like if its in 3D coords) there is a different layer of tilemap.
My player is like 1.5 blocks tall and I want to put it in the world, but I can’t understand how to draw the player in the right order with the tilemap to prevent the player going over or under every layer of the tilemap.
Right now every layer except the terrain one is drawn on top of the player like in this image:
Another example of an expected result:
I also tried making the same thing with threejs before doing it in godot where I can define the order of every object before rendering every frame, so I divided my tilemap by distance from the camera and put the player in the right spot in the rendering order based on its distance from the camera (its like zindex but without changing the actual Z of the sprites, just calculating it from the X and Y coords of the world).
But I don’t think there is a way to do this in godot and I have no idea where to start.
The question is, how do I manipulate the rendering order of the tilemap to make the player fit in the right spot? If this is not possible, is there any way to archieve the expected results?
[ad_2]