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

Navigate via GPS / place scenes in real-world locations #5575

Open
jywarren opened this issue Jul 7, 2022 · 1 comment
Open

Navigate via GPS / place scenes in real-world locations #5575

jywarren opened this issue Jul 7, 2022 · 1 comment
Labels
enhancement work that enhances an existing feature P3 Backlog

Comments

@jywarren
Copy link

jywarren commented Jul 7, 2022

Is your feature request related to a problem? Please describe.

Yes and no; I want to be able to use Mozilla Hubs scenes depicting real places interactively when visiting those real world sites. I'm developing a project reconstructing a destroyed neighborhood -- Providence's historic Chinatown -- in Hubs, and I'd like to be able to navigate the scene by walking around the present-day site of the neighborhood.

image

Describe the solution you'd like

AR.js has a simple library to locate A-Frame models at a latitude and longitude:

Describe alternatives you've considered

I could export the gltf but I would lose the multiplayer environment, the atmospheric effects, the interactivity. It wouldn't be Hubs anymore without all those great features!

Additional context

I'm also interested in whether I could achieve this as an "add-on" -- that is, by running JavaScript (say, from a bookmarklet) on top of a running instance of Hubs, especially if this feature isn't accepted or if it takes a long time to implement. AR.js suggests this code; maybe it could be adapted to run on top of an existing Hubs scene?

        let latitude = place.location.lat;
        let longitude = place.location.lng;

        let model = document.createElement('a-entity');
        model.setAttribute('gps-entity-place', `latitude: ${latitude}; longitude: ${longitude};`);
        model.setAttribute('gltf-model', './assets/magnemite/scene.gltf');
        model.setAttribute('rotation', '0 180 0');
        model.setAttribute('animation-mixer', '');
        model.setAttribute('scale', '0.5 0.5 0.5');

        model.addEventListener('loaded', () => {
            window.dispatchEvent(new CustomEvent('gps-entity-place-loaded'))
        });

        scene.appendChild(model);

Thank you!! ❤️

@jywarren jywarren added the enhancement work that enhances an existing feature label Jul 7, 2022
@emclaren emclaren added the P3 Backlog label Jul 12, 2022
@jywarren
Copy link
Author

I realized that the VR headset interface "walks" you around as you move in the physical world. I wonder if it uses a standard location API to do so, even if it's doing its own tracking with acceleration and video to feed into that api?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement work that enhances an existing feature P3 Backlog
Projects
None yet
Development

No branches or pull requests

2 participants