-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
tileMap layer shows wrong position in editor #88103
Comments
Try changing the Z index. The example show both set to 0. |
but, thats something very easy to do for anyone running dev3... why do i have to do it ? |
Look in the inspector for each tilemap. The setting for Z index is there. You can change it. The order of the layers in the inspector does not affect draw order. Godot does not draw layers the same way as Photoshop where the order of the layer determines the draw order. In Godot when two or more layers are on the same Z index, it is essentially random whether one gets drawn before the other. Change the Z index to control the draw order. Kindly close the issue if that makes sense and your project starts to behave. |
@RoyBerube This is false, the draw order of non-y-sorted layers with the same z-index should be the same as within the inspector. Please don't spread misinformation. If it doesn't work like that in some cases then it's a bug (please report such cases if they're not reported yet). By design they should be rendered according to the layer order (for the same z-index and no y-sorting).
@jonSP12 Currently there's an ongoing process of moving TileMap layers to individual Nodes (this proposal is being implemented). Some initial work for this is already included in 4.3.dev3, this bug is very likely caused by this. So some TileMap related regressions are expected to happen because of the mentioned ongoing rework, but they will surely be checked/addressed before the Back to the issue: confirmed it's working correctly in v4.3.dev2.official [3524346], this is a regression. Happens on runtime too (not an editor-only issue). extends TileMap
var swap_count := 0
func _input(event: InputEvent) -> void:
if event.is_action_pressed("ui_accept"):
swap_count += 1
print("Swap %s" % [swap_count])
print_layers()
move_layer(1, 0)
print("move_layer(1, 0)")
print_layers()
print("-".repeat(80))
func print_layers() -> void:
var layer_names := []
for i in get_layers_count():
layer_names.push_back(get_layer_name(i))
print("Layer names: %s" % [layer_names])
print("Children: %s" % [get_children()]) Output v4.3.dev.custom_build [94dbf69]:
|
I know :D ... Someone probably forgot to put it the way it was before, or didnt bothered since they are being moved to tree nodes. They will probably be moved up and down like 2d sprites on the tree. ( the bug is not a big deal... ) |
Tested versions
4.3 dev 3
System information
windows 10 vulkan foward+
Issue description
layer shows in wrong position in editor
Steps to reproduce
_
Minimal reproduction project (MRP)
NA
The text was updated successfully, but these errors were encountered: