Is RayInput expecting a camera that is a direct child of a Scene ? The arm model seems to expect a camera whose local matrix is directly driven by getFrameData. That is the way THREE works at render time to get the VR cameras: https://github.com/mrdoob/three.js/blob/608fb12d7cdb7d9bdce193d9c9e63fa082b8de81/src/renderers/webvr/WebVRManager.js#L108
However, the RayRenderer directly receives a local matrix:
|
this.renderer.setPosition(modelPose.position); |
Which means that if the camera is down a hierarchy, the RayCaster ray origin and orientation won't be set correctly: they'll be set in camera local coordinates, not world coordinates as they should be.
Is that the intended behavior or am I missing something here ?
Is RayInput expecting a camera that is a direct child of a
Scene? The arm model seems to expect a camera whose local matrix is directly driven bygetFrameData. That is the way THREE works at render time to get the VR cameras: https://github.com/mrdoob/three.js/blob/608fb12d7cdb7d9bdce193d9c9e63fa082b8de81/src/renderers/webvr/WebVRManager.js#L108However, the
RayRendererdirectly receives a local matrix:ray-input/src/ray-input.js
Line 130 in 65f312f
Which means that if the camera is down a hierarchy, the
RayCasterray origin and orientation won't be set correctly: they'll be set in camera local coordinates, not world coordinates as they should be.Is that the intended behavior or am I missing something here ?