首页 > 解决方案 > How to reset camera position with DeviceOrientationControls on mobile device

问题描述

I create webvr by three.js and I use DeviceOrientationControls to controls on the mobile device and create recenter button but I don't know how to do it, I can create this function with orbitControls on the desktop by config controls.position to default position but it doesn't work on mobile.

Recenter desktop code:

 button.onclick = () =>{
      controls.object.position.set(
        1.2246467992175396e-20,
        1.6,
        0.00010000000002024652
      );
    };

标签: three.jswebvr

解决方案


推荐阅读