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

Look for the holdable media root when grabbing an object #6393

Merged
merged 1 commit into from
Dec 4, 2023

Conversation

keianhzo
Copy link
Contributor

When grabbing an object we want to look for the root media loader as that's the object that have a networked transform.

Related #6338

name="Image"
image={imageDef}
objectMenuTarget={{ isFlat: true }}
grabbable={{ cursor: true, hand: false }}
Copy link
Contributor

@Exairnous Exairnous Dec 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it's only grabbable for 2D users and not VR users. Is this intentional or am I missing something?

Copy link
Contributor Author

@keianhzo keianhzo Dec 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only want media loaded as spawned media to be hand grabbable (but we want them to be cursor interactable) so only the root media prefab is the one grabbable, not all scene media:

https://github.com/mozilla/hubs/blob/b951508b7ab5f505561290e02dd053fc029cbf96/src/prefabs/media.tsx#L16

Is the same for the rest of the media loaders, load-pdf. load-video, etc.

@keianhzo keianhzo merged commit 13d7597 into master Dec 4, 2023
9 of 10 checks passed
@keianhzo keianhzo deleted the bitecs-media-link-hold-bug branch December 4, 2023 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants