Demonstration of the issue: https://i.gyazo.com/c029a31d25ec63f924b99fa53831092a.mp4
Pretty sure this is a common issue but I don't know what to do </3
Essentially, I have a tilemap that extends upwards beyond the y-axis (y = 0) and whenever my player crosses the y-axis, it disappears. I believe this is an issue with tilemap y-sorting and the grass/water tilemap's position is above the players or something like that, but I don't know what to do to fix it. I've attached screenshots of the node trees here.
(Note: main_scene.tscn (first screenshot), level_1.tscn (second screenshot) and level_2.tscn (third screenshot) are all different scenes)
What I've tried already:
I've tried debugging with this link: https://forum.godotengine.org/t/player-randomly-dissapearing-in-game/90999/9 as it appears they were facing the same issue. The answer given was "You have Y sort enabled on the root node, so the tilemap is placed above the player because it’s y value (at 0, 0) is above the player’s. I believe you only want Y Sort on the tile map layers."
- ...except when I disabled y sort on the GameTileMap node and Level2 node (I also tried just disabling it on Level2 and keeping it on for GameTileMap, and vice versa), all that happened was the player was just fully hidden beneath the two tilemaps
I've also seen this one: https://www.reddit.com/r/godot/comments/ss38x6/character_disappears_when_walking_into_a_certain/
which basically suggests the same thing.
- I've also tried going to main_scene.tscn and turning off y-sort for GameRoot or LevelRoot or both or none, but none of them work.
Currently, I have:
In main_scene.tscn:
- Y-sort checked: GameRoot, Player, LevelRoot, Level1, Level2
In level_1.tscn: - Y-sort checked: Level1, GameTileMap, Overgrowth, Objects
- Y-sort unchecked: Water, Grass, Undergrowth
In level_2.tscn: - Y-sort checked: Level2, GameTileMap, Overgrowth, Objects
- Y-sort unchecked: Water, Grass, Undergrowth