0 votes

Aham, here we go again,

Looks like Y-Sort on tilemaps disable any settings you have with Visibility, at least for now. (Godot 3.1.1) So, I found a way of hiding them, by moving them out of frame, but,

Is it safe to teleport a entire tilesetmap out of screen at large distances, like -50000 on X? Or are there any other more practical solution to hide a tilemap/tileset pieces?

The looonnnggg story:

I was stuck on finding a way to hide my tilesets. I made a autohider node which once detected player, would hide a tilemap that contained say the wall of a room, so we get the impression of entering the room, just like the old-school Fallout Games.

If I placed the tilesets in a Node2D to hide them when the player collides with polygon I drawed, the Node2D would mess the tilesets Y-Sort system, and they will get based on the Node2D Z-Index, and not be calculated per-tile Z-Index of the entire world, which should be.

So I got a solution, I just move the tilemap out of the view of the player, say like -50000 X, it looks like the tileset is hidden ._.

I tried to scale them to 0, but I don't know why it made the editor a lot slower, and also I fear to break anything, as scalling can lead to unexpected problems later.

So another question is, should I be worried about teleporting tilemaps to higher distances out of screen?

Thanks for your patience,

Cheers

in Engine by (371 points)

Please log in or register to answer this question.

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 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 webmaster@godotengine.org with your username.