-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
look-controls no longer manage the camera pose in VR mode (fix #3315 #3118 #3051 #2487) #3327
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
Conversation
95b98bf to
ebfae45
Compare
|
r- as is This stacks the Vive's absolute pose in the room on top of a defined 1.6m on the camera rig. Resulting in being way too high up. |
d0ef959 to
cf1aa7d
Compare
|
This PR adapts to the changes proposed to the THREE VRManaged in mrdoob/three.js#13158 Tested on:
|
|
@ngokevin It is up to you to put the camera where you want in 2D mode. You can just place the camera where you want. You don't need a camera rig. The default A-Frame camera is placed at 1.6m already for people they don't want to mess with it |
|
@ngokevin Look at |
|
r+ Can you dump some knowledge here for future reference? Everything about the sitting to standing transform, how the camera is handled internally by three.js, etc. |
|
The code is now much simpler than before. The camera pose is managed completely by THREE and you will always have a user scale height: Either the one coming from the VRDevice sensors or a 1.6m default otherwise. The use of sittingToStandingTransform can be safely ignored by A-Frame. All poses coming from VRDevices are normalized to |
266e942 to
f3ff4ca
Compare
|
Lots of questions about how to use this now. 😅 If camera pose is handled by THREE for 6DOF, I don't see any code here that would set the camera's position back onto the entity ... How do I look up the user's position in the scene? And how would components like In <a-entity position="0 1.6 2" camera look-controls wasd-controls></a-entity>Please correct me on any of this that is wrong:
|
|
Magic, in 0.8.0 you don't need to do To move the user around you just create a camera rig that you move around. To position the camera in 2D mode you just position the camera: The position is saved when entering VR mode and restored when exiting. The A-Frame default camera already sets the height to 1.6. For 3DOF devices the height is 1.6 by default. Not configurable but you can move up and down the user with a camera rig if necessary. |
|
Thanks to @arturitu for testing on:
|
|
Ok, I think this all sounds good but just to clarify.... <a-entity id="cameraRig" position="25 100 25">
<a-entity id="head" camera position="0 1.6 0" look-controls></a-entity>
<a-entity teleport-controls="cameraRig: #cameraRig; teleportOrigin: #head;"></a-entity>
<a-entity teleport-controls="cameraRig: #cameraRig; teleportOrigin: #head;"></a-entity>
</entity>Means that...
|
|
@donmccurdy correct to all of the above 😄 |
|
Ok, LGTM. 👍 Other thoughts:
|
|
@donmccurdy Can you file an issue for the Rotation composition is tricky 😄 |
… VREffect / VRControls the camera pose udpate is entirely managed by THREE. VRManager falls back to a default 1.6m height when the VRDevice does not have positional tracking or stageParameters data. One can position the camera in 2D mode. When entering VR the value will be stored and restore upon exiting VR mode. (fix aframevr#3315 aframevr#3118 aframevr#3051 aframevr#2487)
|
Thanks everybody for your help on this PR. I got stuck for a while unable to make a decision I would feel comfortable with. |
|
Nice! |
|
I do think that as best practice for 6DOF we could use example that use a player rig and teleport (even if we only do the shoot-the-floor version with laser-controls) |
|
The gaze cursor is now disappearing when in VR mode on mobile devices. See related issue #3375 |

Instead VRManager from THREE does update the pose applying always
standingcoordinates so a user height is always present in the pose: defaulting to 1.6 in the case of 3DOF headsets.