Facepunch / sbox-issues

175 stars 12 forks source link

Map Instance parts (geometry, skybox, lights, etc) don't fully inherit the GameObject tags #4845

Open Gmod4phun opened 8 months ago

Gmod4phun commented 8 months ago

Describe the bug

It seems that adding a tag to a GameObject that has a MapInstance component does not propagate the tags down to the individual SceneObjects of things like map geometry, lights, skybox, etc. That means I can't use the camera render tags to exclude the map instance from rendering, as it only excludes the props and such.

To hide the world geo, the camera needs the 'world' exclude tag. For skybox, it's skybox.

https://github.com/Facepunch/sbox-issues/assets/5991682/449f3acf-1baf-4a53-bdad-079295103e16

Making the Map Instance propagate tags to the skybox/geo/etc would make it possible to exclude the rendering of individual maps for individual players. And while the support for multiple map instances is not working properly at the moment, I believe that is something that will be addressed in the future.

To Reproduce

  1. Create a Map Instance
  2. Add a tag to it
  3. Create a Camera with that tag excluded
  4. See that it does not fully exclude the whole Map Instance

Expected behavior

All parts of the map should inherit the tags set on the GameObject, so that the whole map can be excluded from rendering.

Media/Files

No response

Additional context

No response

kurozael commented 8 months ago

I know why - I'll sort this out.