Hubs-Foundation / hubs

Duck-themed multi-user virtual spaces in WebVR. Built with A-Frame.
https://hubsfoundation.org
Mozilla Public License 2.0
2.13k stars 1.42k forks source link

Improve Cardboard Support #2657

Open joshmarinacci opened 4 years ago

joshmarinacci commented 4 years ago

Lots of people still use Google Cardboard style viewer. It would be good to support them.

elmau commented 4 years ago

It could be useful to give support for a gamepad while in cardboard mode, or give the ability to walk forward while gazing down to a specific point in the hud.

The user will walk like an old robot (forward, stop, head turn, forward, stop, head turn), but it could be great to be able to move in a room using a cardboard viewer. I tried that method some years ago in a unity project and it worked better than I expected.

djay commented 3 years ago

Seems like there is an existing issue for supporting normal gamepads on mobile - https://github.com/mozilla/hubs/issues/1955

I also think a "stare" to move system could work fine. Also a stare to click as some headsets don't even have a button. Some games impliment a 3 sec timer when you point using your head at something to initiate a click. The same could be done for pointing at a virtual forward or back button

emclaren commented 3 years ago

Just flagging here that we've received a few emails about this in the last week

salazarbarrera commented 1 year ago

If one wanted to contribute about this, where one could start? The code is extensive, and any hint about which methods one should tamper to start playing around with the walking function on cardboard would be really appreciated. Edit: Is it some sort of limitation inherent to A-Frame default settings? This stack overflow question makes me think that may be the case, but I'm not sure.

kalyanraju commented 1 year ago

Provide some insights or code references we could tweak to achieve movement and interactions on cardboard. This will make hubs accessible to many users who cannot afford costly vr systems.

djay commented 1 year ago

@kalyanraju a link was provided by @salazarbarrera which leads to https://github.com/c-frame/aframe-extras/tree/master/src/controls which seems perfect as it covers almost everything. I have no idea if that is easy to add or not? Is there a reason this couldn't be added?

Seems to allow almost all options you could want. Maybe only thing it doesn't do is make it easy to move if you have no button. Then you have to stare at the onscreen movement buttons or stare at checkpoints (which limits where you can move). It would be nice if let you move towards any point on the floor by staring at it long enough but maybe they will add that later?

vincentfretin commented 1 year ago

Please note that aframe-extras movement-controls's touch controls for iOS Cardboard is using the old WebVRManager in aframe threejs fork https://github.com/supermedium/three.js/tree/super-r154 where we kept it and maintained it (it's removed in three.js repo) It worked on aframe 1.4.2 three 147 last time we checked, I don't know if it still works with r154, and may break again later. This is not actively tested. See the two commits related to WebVRManager. https://github.com/mrdoob/three.js/compare/dev...supermedium:three.js:super-r154 Note that hubs is actively removing aframe and networked-aframe from its code base, and has it's own three.js fork, not having the WebVRManager code.