Skip to content

RayInput not working for non-top level cameras ? #33

@charlesfleche

Description

@charlesfleche

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions