Skip to content

Conversation

@stlewis
Copy link
Contributor

@stlewis stlewis commented Oct 22, 2018

Description:
This fixes #3728 and #3748
Changes proposed:

renderer = this.renderer = new THREE.WebGLRenderer(rendererConfig);
renderer.setPixelRatio(window.devicePixelRatio);
renderer.sortObjects = false;
renderer.vr.setPoseTarget(this.camera);
Copy link
Member

Choose a reason for hiding this comment

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

We have to do the same here.

@dmarcos
Copy link
Member

dmarcos commented Oct 22, 2018

Can you add setPoseTarget to the underlying object3D (fix #3728, #3748, #3771) to the commit comment so the issues are automatically closed?

@stlewis stlewis changed the title setPoseTarget to the underlying object3D Oct 22, 2018
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.

@stlewis stlewis force-pushed the fix-go-camera-height-bug branch from cac00dc to 14d9ca4 Compare October 22, 2018 20:26
renderer.setPixelRatio(window.devicePixelRatio);
renderer.sortObjects = false;
renderer.vr.setPoseTarget(this.camera);
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

renderer.setPixelRatio(window.devicePixelRatio);
renderer.sortObjects = false;
renderer.vr.setPoseTarget(this.camera);
if (this.camera) renderer.vr.setPoseTarget(this.camera.el.object3D);
Copy link
Member

Choose a reason for hiding this comment

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

Missing curly braces: if (this.camera) { renderer.vr.setPoseTarget(this.camera.el.object3D); }

@dmarcos
Copy link
Member

dmarcos commented Oct 22, 2018

Thanks! Congrats on your first contribution 🏅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants