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

Tilemap collision is disabled when not visible #83499

Closed
ChloePrime opened this issue Oct 17, 2023 · 5 comments · Fixed by #83560
Closed

Tilemap collision is disabled when not visible #83499

ChloePrime opened this issue Oct 17, 2023 · 5 comments · Fixed by #83560

Comments

@ChloePrime
Copy link

ChloePrime commented Oct 17, 2023

Godot version

v4.2.beta1.mono.official [b137180]

System information

Windows 11 22H2

Issue description

Expected:
Tilemap still has collision when invisible.
This is how it works in 4.1.2

Actual:
Tilemap has no collision if set visible to false.

Steps to reproduce

  1. Add a tilemap to your level
  2. Add a tileset and add collision
  3. Add something that reacts upon the collison layer of said tilemap.
  4. Set the tilemap to be invisible (via code)
  5. See the "something" noclips at the invisible tilemap

Minimal reproduction project

Tilemap Collision MRP.zip

@groud
Copy link
Member

groud commented Oct 17, 2023

Well, this was a bug that got fixed.

If you need that feature again you can set the TileMap modulate property to have an alpha of 0 for now, that should do the trick. There's demand for it, I guess we could implement a "disable rendering only" feature though.

@Zireael07
Copy link
Contributor

Please add a "disable rendering only" feature - this is a problem that caught me out with other nodes too, not just Tilemaps.

@AThousandShips
Copy link
Member

In this case the behavior of TileMap breaks with how other sources of physics works, so documentation is important, and an option to make it match other code (and old code) would be good

@Mickeon
Copy link
Contributor

Mickeon commented Oct 17, 2023

Yeah. If I make the player invisible it's not like he'd start spontaneously falling through the ground. Are we sure this should qualify as a bug being fixed here? This... renders TileMap the exception, not the norm.

@groud
Copy link
Member

groud commented Oct 18, 2023

I've just checked and indeed you are right that physics node still work when being made invisible.
So yeah, for consistency this should be working as other physics nodes. I'll fix that.

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

Successfully merging a pull request may close this issue.

6 participants