decentraland / unity-explorer

Apache License 2.0
8 stars 11 forks source link

Handle invisible components out-of-scene-bounds behaviour #1201

Closed pravusjif closed 2 weeks ago

pravusjif commented 4 months ago

Currently the scene shader discards rendering of meshes beyond their containing scene bounds.

The problem is that there are other (non-rendered/invisible) components that can't be handled that way, those being:

Some scenes may completely ruin experiences outside their own bounds if those cases are not handled (it happened many times in the past...).

We'll need some logic similar to the one used for sdk7 in the unity-renderer to handle those cases, a lot more info on what is implemented at https://adr.decentraland.org/adr/ADR-192.

popuz commented 3 months ago

keep in mind that for colliders there is a CheckColliderBoundsSystemand respective test: ColliderBoundsCheckerShould

mikhail-dcl commented 3 months ago

I believe Mesh Colliders are functional, or @pravusjif you have something else in mind?

pravusjif commented 3 months ago

Cool, I haven't tested it but if colliders are already handled with what Vitaly mentions (even GLTF colliders?) then we just need to implement something for Audio components (AudioSource and AudioStream).

pravusjif commented 2 months ago

Maybe for a first "quick" implementation we can avoid all the "scene bounds checking stuff" and just have a system muting/stopping all audio that is playing from scenes that are not the current one...

(prolly better muting so that the scene logic keeps working as expected when you re-enter a scene)