Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align TileMapLayer Horizontally Alongside Node2D #10095

Open
agrimminck opened this issue Jul 2, 2024 · 3 comments
Open

Align TileMapLayer Horizontally Alongside Node2D #10095

agrimminck opened this issue Jul 2, 2024 · 3 comments
Labels

Comments

@agrimminck
Copy link

agrimminck commented Jul 2, 2024

Describe the project you are working on

An Squared-Grid Isometric Online RPG

image

Describe the problem or limitation you are having in your project

As my project uses diagonal-isometric art, it is required to align items horizontally alongside the tile map layer. Right now it can only sort it on the y-axis, but I can't sort it on the X axis, so it ends up looking like the image above. When a character is on the same y coordinate as a tilemap cell, it does always look under it, or if I do some tweaks, always look over it.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

It would let me align the tile map (trees in the image) with the Node2Ds (characters in the image) so they can get on top of the tilemap if they are to the right and viceversa

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Use the same behaviour as y-sorting, which can handle tile cells with Node2D's at this point in time, but for the horizontal axis

If this enhancement will not be used often, can it be worked around with a few lines of script?

I have tried and searched on forums on the internet and found nothing about a way to go around this. The only thing that can be achieved is to have a diamond-shaped-cells, that way the y-sorting works because it is a diagonal setup

Is there a reason why this should be core and not an add-on in the asset library?

There is no reason for it to be core. It could be an addon aswell

@KoBeWi
Copy link
Member

KoBeWi commented Jul 2, 2024

This was already implemented in godotengine/godot#92787 I think.

@agrimminck
Copy link
Author

This was already implemented in godotengine/godot#92787 I think.

I tested that feature but it only works on tilemaps, it does not include Node2D's that are wished to be aligned alongside the tilemap

@agrimminck
Copy link
Author

Here's an image of how it works perfectly on diamond-shaped tilemaps
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants