Home Game Development 2d – Draw a player in an isometric tilemap in the right order

2d – Draw a player in an isometric tilemap in the right order

0
2d – Draw a player in an isometric tilemap in the right order

[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:
enter image description here

Expected result:
enter image description here

Another example of an expected result:

enter image description here

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]

Previous article Kojima’s Xbox Exclusive Is Called OD And Involves Jordan Peele
Next article The RPS Advent Calendar 2023, December 10th
Hello there! My name is YoleeTeam, and I am thrilled to welcome you to AmazonianGames.com. As the premier destination for all things related to Amazon Games' universe, we are dedicated to providing you with the most exciting and immersive gaming experiences out there. From captivating visuals to exhilarating gameplay, our website is packed with comprehensive insights, updates, and reviews to keep you ahead of the game. Whether you're a seasoned gamer or new to the scene, I am here to guide you through this virtual frontier. If you have any questions or suggestions, feel free to reach out to me at john@yoleesolutions.com. Embark on your Amazon gaming journey today with AmazonianGames.com and let the adventure begin!