mozilla / hubs

Duck-themed multi-user virtual spaces in WebVR. Built with A-Frame.

Home Page:https://hubs.mozilla.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BG - Media Frames could be more useful with a filter

j-conrad opened this issue · comments

Is your feature request related to a problem? Please describe.
The discrepancies that can be made for Media Frames are useful, particularly for distinguishing between 2d and 3d content. However, when using Media Frames with behavior graphs, it becomes apparent that they could use a filter for specific objects and/or for tags.

I'm not sure which is better, but tags probably gives the most flexibility. For example, if the Media Frame component had an input list where I could put tag names, it would allow the media frame to only capture items with that tag. Or perhaps it could be toggled between a black/whitelist. (Only capture these tags vs. Never capture these tags)

This would make it easier to use Media Frames as lock/key pairs. For example, having 4 slots that must be filled. With tags, you could ensure that only items tagged 'keys' could go in the slots. Each slot could be filtering for a specific key. Or each slot could also filter for a tag called 'skeleton', etc...

Most of the need here is to avoid having media frames, especially moving ones, capturing things unintentional to the design.
For example, you might want to capture all 'duckies' but right now, you don't want to capture the one being held by someone.
The ducky that's picked up could be given a tag 'held', that is on the media frame's blacklist.

Describe the solution you'd like
A way to filter for tags on the Media Frame component. The need for a blacklist/whitelist toggle is TBD.

Describe alternatives you've considered
I've tried making use of the Set Active and Set Locked feature of the behavior graph node, but those are limited to turning the whole thing on/off.
I've also tried using a separate trigger volume to first filter the items via behavior graph, but this is very cumbersome and time consuming. Attempting to turn the media frame on/off like that is error-prone when done rapidly.

Is there a tag component type already in the Behaviour Graph code?

We might also want to give some thought about how the "is allowed" evaluation might be made BG-friendly in future. i.e. is using tags like this just a special case that you could replace with a hasTag graph node? That said, BG support should probably be in addition to the proposed system so people don't have to use BG for simple use cases.