Now that you have built a couple WebVR scenes, you need to program your camera controls so you can "shoot" different scenes.
A camera should usually be positioned at the average height of human eye level (1.6 meters). When used with controls that receive rotation or position (e.g. from a VR device) this default position will be overridden.
<a-entity camera look-controls position="0 1.6 0"></a-entity>
You can customize the way your controls move in the scene using wasd-controls
. Acceleration
is the speed of your movement 100
being fastest, fly
set to true
meaning you are no longer stuck on the same Y-plane, and position would be you starting camera position.
This is a great way for you to set up your scene for screen capture. Imagine your self as a VR videographer filming inside your Web VR Scene.
You can customize your camera controls using camera
. Field of Viewfov
is like lens types - zoom lens or wide angle from 1-179 degrees
. Smaller the number the narrower the field of view. 179 would be an ultra ultra ultra wide lens and will have massive lens distortions.
Zoom
is how much magnification you want. Default is at 1 but can zoom in to do close ups!
I usually like to put my camera and wasd controls at the end of my html document for easy access.
FAST, BIRDS EYE VIEW
<a-entity
camera="fov: 130; zoom: 1"
look-controls="active: true"
wasd-controls="acceleration:190; fly: true"
position="0 1.6 0"></a-entity>