Camera

Camera

Working with the Camera

The standard camera looks in -z direction:

It is recommended to work with the camera to have more control over the scene. The tag is <a-camera>. The official manual says, «to position the camera, set the position on a wrapper <a-entity>. Don’t set the position directly on the camera primitive because controls will quickly override the set position».

Example

Code:

<a-scene>
  <a-entity
    id="camera"
    position="8 0 -4"
    rotation="0 90 0"
  >
    <a-camera user-height="0.2"></a-camera>
  </a-entity>
  <a-box
    id="box"
    position="-1 0.5 -3"
    rotation="0 45 0"
    color="#4CC3D9"
  ></a-box>
...

View on Screen:

View in the inspector (CTRL ALT i):

The default values of the position of the camera are 0, 1.6, 0 in Desktop Mode and 0, 0, 0 in VR Mode

Comments are closed.