i made buildings and trees on the map, and i want to know how can my player go behind the tree or behind the building ?
Put all objects in a family and do a for each family ordered ascending by Y move to top of layer. This uses their Y position so if the player is higher than the object they will go behind it and if lower then appear in front of it etc.
demo:
howtoconstructdemos.com/z-sorting-in-an-isometric-view-game
I tried it, now i cant go behind my trees and i cant go behind my buildings
its working now :) thank you so much
Develop games in your browser. Powerful, performant & highly capable.
Buildings and trees should be in one family. And you don't need to z-sort this entire family on every tick, once on start of the layout is enough. Only change player's z-order on every tick.
now it does this
Position of origin image point is also important. Ideally it should be at the bottom for all objects.
Thank you so much :)