I was having trouble with z ordering on my top-down game. The player seems to only move in front/behind when that is true for all of the trees in the layout.
In this image the player is in front of the tree, I wanted to know if there was a way for me to get him to move behind it.
Thanks!
There's a z order bar where you can put all objects in order from top to bottom
What I'm looking for is when the player's y coordinate is less than the tree it is in front and when player y is greater than tree y then the player is in front
Aight that wasn't mentioned before haha. Put every object that needs to be Z ordered into a Family and use the logic : for each Family ordered by Y ascending : move to top of layer
There is a built-in action for this
Put all objects that you want to be sorted into a family "ZSortFamily"
Then use System > Sort "ZSortFamily"
Develop games in your browser. Powerful, performant & highly capable.
That worked great! Thanks for your help!
Hi ! do you have a screen for that ?
A screenshot?
Yes ! sorry, my english is bad
So, do you have a screenshot for me ?
By the way, the "PositionY" is an instance variable
Sorry but I don't understand the right way to do it :/
It works for everything except for the weapon because it has a z value of 1 so that it appears in front of the character. How to fix it?
I'm fix that, thank's for all !