MozillaReality / unity-webxr-export

INACTIVE - Assets for creating WebXR-enabled Unity3D projects.
https://mixedreality.mozilla.org/unity-webxr-export/Build/
Apache License 2.0
623 stars 127 forks source link

Add Free-Flight control behaviour to navigate the scene #125

Closed delapuente closed 6 years ago

delapuente commented 6 years ago

If updating the polyfill #49 , this is mandatory.

cvan commented 6 years ago

see https://github.com/mozilla/unity-webvr-export/pull/157#discussion_r170828724:

and look what I found: https://github.com/jsantell/three-simple-fp-controls/blob/master/src/SimpleFPControls.js 👍

this is specific to three.js, but we have all the Unity-equivalent properties we need in WebVRCamera.cs.

cvan commented 6 years ago

pasting conversation here (from PR #157) for posterity:

@jsantell:

The desktop (mouse, webcam) controls were removed because extra complexity, and it was unclear what the "native" desktop controls should be (something like OrbitControls were the default, only 3DOF, I prefer something FPS-y usually, like simple-fp-controls linked above). More explanation here. The example was updated to show supporting desktop in a few lines

That being said, I think something like polyfill.addDisplay(FPSControlsVRDisplay) could be implemented so that people could use shared desktop solutions (and link to it in polyfill) if they wanted. Open to hear more about supporting desktop!

@jsantell:

FYI the simple-fp-controls were mostly lifted from Three's FPS controls, simplified a bit, and avoided pointer lock, could change key bindings, used mostly for experiments, use at your own peril 😄

@cvan:

@jsantell: thanks for stopping by to provide this info - all extremely helpful.

I 💯 agree re: FPS controls being preferable on desktop. I've seen first hand in person and across GitHub issues and social media much confusion with both users and developers in interacting with mouse-look controls. it just doesn't translate well, unless the scene is auto-rotating (à la Flickr's equirectangular photos) and/or with text hints + icons (à la Facebook's 360° embeds).

cvan commented 6 years ago

If updating the polyfill #49 , this is mandatory.

for those following this issue:

it's issue #113 that covers the upgrade of webvr-polyfill, which now includes the cardboard-vr-display dependency.

cvan commented 6 years ago

@delapuente you're assigned this (but I know that was by @caseyyee a few weeks ago). did you want to still work on this? I can work on it, if you don't have bandwidth.

cvan commented 6 years ago

perhaps I didn't see the discussion. this issue was previously for First-Person-Shooter controls. are there advantages to Free-Flight instead? just anecdotally, in my experience, a good percentage of Unity games have FPS-only controls. are we opting to not provide FPS default control schemes? or we just want to do Free-Flight controls first? just was curious about the pros, cons, and rationale. thanks!

cvan commented 6 years ago

@delapuente: in particular, I was expecting FPS controls like this https://threejs.org/examples/misc_controls_pointerlock.html - thoughts?