Skip to content

Override Camera Reposition on onDocumentTouchEnd #15

Description

@bwolvin

I wanted to see if there was a way to override the camera getting set back to the original position when a user manually interacts with the DOM element. Right now, I am trying the following code but it seems like something in the threeVR is overriding this getting set correctly:

function getCameraPosition() {
    var vector = new THREE.Vector3(0, 0, -1);
    vector.applyEuler(camera.rotation, camera.eulerOrder);
    return vector;
}

controls.addEventListener('userinteractionend', function () {
    camera.lookAt(position);
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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