Skip to content

Commit b32a39c

Browse files
committed
add camera height as it is no longer added by A-Frame (part of upgrade to VREffect)
1 parent ab7b1f2 commit b32a39c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

misc_components/progressive-controls.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,11 @@ AFRAME.registerComponent('progressive-controls', {
6060
assets.appendChild(pointDefault)
6161
assets.appendChild(touchDefault)
6262

63-
this.camera = this.el.querySelector('a-camera,[camera]') ||
64-
this.el.appendChild(document.createElement('a-camera'))
63+
this.camera = this.el.querySelector('a-camera,[camera]')
64+
if (!this.camera) {
65+
this.camera = this.el.appendChild(document.createElement('a-camera'))
66+
this.camera.setAttribute('position', '0 1.6 0')
67+
}
6568
this.caster = this.camera.querySelector('.gazecaster') ||
6669
this.camera.appendChild(document.createElement('a-entity'));
6770
['left', 'right'].forEach(hand => {

0 commit comments

Comments
 (0)