Aframe: Proposal: add Pointer Lock to look-controls only for desktop fullscreen mode without headset

Created on 25 Apr 2017  路  13Comments  路  Source: aframevr/aframe

Description:

Pointer Lock is an easier way to look around on desktop than mouse-drag. Mouse-drag also has problems that it triggers clicks on time users move. We could add Pointer Lock to the default control scheme if:

  1. User is on desktop
  2. User does not have a headset detected
  3. User enters fullscreen mode

It seems like Pointer Lock doesn't prompt permissions on Firefox and Chrome anymore too when I try Pointer Lock example on MDN with user gesture. So it's not intrusive, use the VR Button click as the user gesture.

We maintain the mouse-drag for now when not fullscreen.

Most helpful comment

Yeah, I'm in favor of a Pointer Lock on by default. I shared some A-Frame stuff to people on desktop and the click-drag is not usable. For default desktop mode, I'd favor Pointer Lock/a-cursor versus Click-Drag/mouse-cursor (they conflict anyways).

There's no permissions hanger anymore since it's activated on click. Try: https://webvr.donmccurdy.com/checkpoints/

All 13 comments

A slightly tangential topic: Should we also consider a screen based raycaster when we're not in fullscreen? (like react-vr)
Another question: Do people use the fullscreen mode? I personally either go to VR or use it in non fullscreen. I see fullscreen useful for probably the embedded case if the preview is very small.

I don't like that screen-based raycasting conflicts with using the mouse to look around. aframe-mouse-cursor-component is available for those that want it. If you have a scene you can't look around or move and interact with mouse raycasting, it's almost the same as a 2D webpage?

If I were to engage in a site on plain desktop, I think I'd use full screen if it offered me Pointer Lock. Also makes it easier if people want to build traditional 3D sites (WASD + Mouse + wall collisions).

Pointerlock would be really valuable for me, I'd be glad to help with the implementation!

Pointerlock on focus seems most natural to me. Mousedrag is a drag D;

What are the cases against just having Pointer Lock always? It used to be we didn't like the Permissions prompt, but if we use the User Gesture, the user has intended to interact with A-Frame and no permission will pop up.

What if there are multiple Aframe scenes on a page, or lots of other content on the site to scroll through?

Multiple A-Frame scenes are not supported. Even so, would Pointer Lock be intrusive? Needing to hit ESC to disengage and continue on.

The only other situation I can think of is if there is lots of content at the top of a page and an A-Frame scene at the bottom. The user could be confused as to why there is no pointer.

I am all for Pointer Lock, though. What is the current third-party component?

Pointer lock is only engaged if you click a scene, so that's not possible

The best component to look at is A-Frame Extra's Universal Controls.

+1 from me for including pointerlock with look-controls, at least as an option.

Side note: I've needed a small hack to disable pointerlock when in inspector mode. Probably want to do the same for look-controls.

I think the .pause() handler would handle that if Inspector is opened

I like this idea and think this really should be in by default. It's painful to develop by dragging the mouse cursor around and really doesn't provide that great of an experience for desktop users checking out aframe experiences.

I know there exists some modules out there that kinda have done this, but they are flakey and unmaintained.

Yeah, I'm in favor of a Pointer Lock on by default. I shared some A-Frame stuff to people on desktop and the click-drag is not usable. For default desktop mode, I'd favor Pointer Lock/a-cursor versus Click-Drag/mouse-cursor (they conflict anyways).

There's no permissions hanger anymore since it's activated on click. Try: https://webvr.donmccurdy.com/checkpoints/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ngokevin picture ngokevin  路  5Comments

AdrienPoupa picture AdrienPoupa  路  6Comments

wlhm1984 picture wlhm1984  路  5Comments

rich311 picture rich311  路  3Comments

jcarpenter picture jcarpenter  路  4Comments