YSort Extention

Does anyone have a YSort extention example project? I wonder how to use it

No examples that I know of. Just add the extension, add the behavior to each object you want to sort. As one objects Y position ends up “higher” (further down on the screen as Y starts from the top and goes down), the Z position of that object is moved forward.

Therefor objects further towards the “Top” of the screen are treated as behind objects further towards the bottom.

Edit: Took another look, and the Isometric game example does use YSort, too.

It’s very simple: set the z order like Y position
So I have 2 object:
player
Wall
Player.Y < wall.Y
image

Player.Y > wall.Y

Automatically the Z sort is changed depending on the Y position of the object in the screen.

1 Like

Do you add the behavior to both the wall and the character or just the character?

I do both if I want them to be sorted.

Hello, welcome to the forum. Please try creating new posts for your issues, avoid reviving several years-old posts like this one and this.

1 Like