immersive-web / webxr-samples

Samples to demonstrate use of the WebXR Device API
https://immersive-web.github.io/webxr-samples/
MIT License
995 stars 479 forks source link

Fixing a bug in scene.updateInputSource #51

Closed Artyom17 closed 4 years ago

Artyom17 commented 4 years ago

The Ray ctor should get a matrix, not RigidTransform. Current logic produces a lot of NaNs and this may cause rendering artefacts. Also, ray.origin and direction do not have x,y,z members.

bialpio commented 4 years ago

The Ray ctor should get a matrix, not RigidTransform.

It might be worth noting that this makes Ray incompatible with the planned XRRay (https://github.com/immersive-web/hit-test/blob/master/hit-testing-explainer.md).