0
votes

I recently upgrade my aframe from 0.5.0 directly to 0.8.1 due to Chrome v65 compatibility issue. One of the changes, as documented is that Aframe no longer controls camera pose, which will be controlled directly by three.js.

There is a recent PR here about the change: https://github.com/aframevr/aframe/pull/3327

This change removes the userHeight parameter support for camera position. In my application, I would need the camera to be at (0, 0, 0) in both VR and non-VR mode.

I tried to use:

<a-entity camera position="0 0 0"> </a-entity>

or

<a-camera position="0 0 0"> </a-camera>

but the result of both of them is that the camera is position at (0, 0, 0) before entering VR. After entering VR, the it is at (0, 1.6, 0) and after exiting VR, it remains at (0, 1.6, 0).

The question is: how do I set the camera postion to (0, 0, 0) in both VR and non-VR mode in [email protected]?

Also, this answer is no longer valid right?

2

2 Answers

3
votes

I had a similar issue to this with camera rotation when I updated to 0.8.

From what I understand, the latest version has now moved the position and rotation management to threejs.

In order to resolve this, you should use a "rig" around the camera and set your position on the rig. The rig is simply a parent entity, that the children will get the relative settings from.

<a-entity id="cameraRig" position="0 1.6 0">
    <a-camera></a-camera>
</a-entity>
1
votes

Does wrapping your camera in an entity help?

https://aframe.io/docs/0.8.0/primitives/a-camera.html#manually-positioning-the-camera

<a-entity position="0 1.6 0">
    <a-camera look-controls position="0 0 0"></a-camera>
</a-entity>