-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
setPoseTarget to the underlying object3D (fix #3728, #3748, #3771) #3820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/core/scene/a-scene.js
Outdated
| renderer = this.renderer = new THREE.WebGLRenderer(rendererConfig); | ||
| renderer.setPixelRatio(window.devicePixelRatio); | ||
| renderer.sortObjects = false; | ||
| renderer.vr.setPoseTarget(this.camera); |
There was a problem hiding this comment.
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.
|
Can you add |
| renderer = this.renderer = new THREE.WebGLRenderer(rendererConfig); | ||
| renderer.setPixelRatio(window.devicePixelRatio); | ||
| renderer.sortObjects = false; | ||
| renderer.vr.setPoseTarget(this.camera); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
cac00dc to
14d9ca4
Compare
src/core/scene/a-scene.js
Outdated
| renderer.setPixelRatio(window.devicePixelRatio); | ||
| renderer.sortObjects = false; | ||
| renderer.vr.setPoseTarget(this.camera); | ||
| if (this.camera) renderer.vr.setPoseTarget(self.camera.el.object3D); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.camera.el.object3D
src/core/scene/a-scene.js
Outdated
| renderer.setPixelRatio(window.devicePixelRatio); | ||
| renderer.sortObjects = false; | ||
| renderer.vr.setPoseTarget(this.camera); | ||
| if (this.camera) renderer.vr.setPoseTarget(this.camera.el.object3D); |
There was a problem hiding this comment.
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); }
|
Thanks! Congrats on your first contribution 🏅 |
Description:
This fixes #3728 and #3748
Changes proposed: