0 votes

I started designing of an isometric dungeon game.

I have a problem because the player sometimes appears through the walls.

I tried to change the setting "Tile Origin" but then the problem moves to another side.

I think of an YSort problem

Main Scene
--->TileMap # Grounds ZIndex 0 TileOrigin Centered Isometric 256x128
--->TileMap # Walls ZIndex 1 TileOrigin Centered Isometric 256x128
--------->Player # Zindex 0 Z As Relative

And Scene Player


Any idea?

in Engine by (19 points)

1 Answer

0 votes

I had some problems (2D platformer) using YSort + Node (Node for container... Enemies for example, and inside that Node every enemy). The YSort breaks

My approach was make an excel with "node" "z index" for memory and ZIndex calculations, and not touching any YSort on Godot, just managing ZIndex
So... for example

Tilemap World --> -100 ZIndex
Player --> 100 ZIndex
Enemy --> 50 ZIndex
Objects --> 20 ZIndex

and so...

The "big" values are in case I need to add something between

Not ideal but works for me

Of course this can be a mess with relative ZIndex and calculation if you dont get track of values (in my case that excel is mandatory for this).

by (162 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.