Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/core/scene/a-scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -547,9 +547,9 @@ module.exports.AScene = registerElement('a-scene', {
renderer = this.renderer = new THREE.WebGLRenderer(rendererConfig);
renderer.setPixelRatio(window.devicePixelRatio);
renderer.sortObjects = false;
renderer.vr.setPoseTarget(this.camera);
Copy link
Member

@dmarcos dmarcos Oct 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need this line but it has to be renderer.vr.setPoseTarget(this.camera.el.object3D); to be consistent with the one below

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Put a guard on it, everything is functioning properly.

if (this.camera) renderer.vr.setPoseTarget(self.camera.el.object3D);
Copy link
Member

@dmarcos dmarcos Oct 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.camera.el.object3D

this.addEventListener('camera-set-active', function () {
renderer.vr.setPoseTarget(self.camera);
renderer.vr.setPoseTarget(self.camera.el.object3D);
});
loadingScreen.setup(this, getCanvasSize);
},
Expand Down