Skip to content
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

v 1.0.4 (master) no world position of the camera with Oculus Quest #4568

Closed
smeybi opened this issue May 2, 2020 · 3 comments
Closed

v 1.0.4 (master) no world position of the camera with Oculus Quest #4568

smeybi opened this issue May 2, 2020 · 3 comments

Comments

@smeybi
Copy link

smeybi commented May 2, 2020

With the Oculus Quest you can get the world position of the camera (0 0 0). Only the camera has this issue, all other works. Only with the Oculus Quest, it works with the HTC Vive, you can get the camera world position.

el.object3D.getWorldPosition()

I'm not sure it's right place here to report this issue instead of three.js

  • A-Frame Version: 1.0.4 + (master)
  • Platform / Device: Oculus Browser / Oculus Quest
  • Reproducible Code Snippet or URL:

Here is a demo, the entity in the camera get the world position, not the camera itself.

https://glitch.com/~world-position-cam-oculus-quest-example

@binzume
Copy link
Contributor

binzume commented May 2, 2020

I have the same issue. Also there is workaround: cameraEl.object3D.matrixAutoUpdate = true; or use cameraEl.components["camera"].camera.getWorldPosition()

@dmarcos
Copy link
Member

dmarcos commented May 2, 2020

getWorldPosition doesn’t work in VR mode. It’s a known THREE bug See this commit for alternative

var originVec3 = new THREE.Vector3();
el.object3D.updateMatrixWorld();
originVec3.setFromMatrixPosition(el.object3D.matrixWorld);

@dmarcos dmarcos closed this as completed May 2, 2020
@smeybi
Copy link
Author

smeybi commented May 2, 2020

Ah ok, I hadn't seen it, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants