Monday, November 14, 2022
HomeGame Development2nd - Draw a participant in an isometric tilemap in the appropriate...

2nd – Draw a participant in an isometric tilemap in the appropriate order (GODOT 4 Beta4)


I am making an attempt to create an isometric tilemap world kinda made from blocks on prime of one another the place for each Y degree (considering the world like if its in 3D coords) there’s a completely different layer of tilemap.

My participant is like 1.5 blocks tall and I need to put it on this planet, however I am unable to perceive how to attract the participant in the appropriate order with the tilemap to stop the participant going over or underneath each layer of the tilemap.

Proper now each layer besides the terrain one is drawn on prime of the participant like on this picture:
enter image description here

Anticipated consequence:
enter image description here

One other instance of an anticipated consequence:

enter image description here

I additionally tried making the identical factor with threejs earlier than doing it in godot the place I can outline the order of each object earlier than rendering each body, so I divided my tilemap by distance from the digital camera and put the participant in the appropriate spot within the rendering order primarily based on its distance from the digital camera (its like zindex however with out altering the precise Z of the sprites, simply calculating it from the X and Y coords of the world).

However I do not assume there’s a approach to do that in godot and I don’t know the place to begin.

The query is, how do I manipulate the rendering order of the tilemap to make the participant slot in the appropriate spot? If this isn’t doable, is there any technique to archieve the anticipated outcomes?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments