three.js - 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
);
};
解决方案
推荐阅读
- javascript - 如何在 A-Frame 中使用 Chart.js?
- python - 如何使用 Python 捕获“FedAuth”-cookie 以连接到 SharePoint?
- raku - 如何将 CArray[of-struct] 从 Raku 传递给 C?
- vue.js - 更改 Vue 中的分隔符?
- svelte - 让 Svelte 在 shadow dom 中添加样式
- python - 尝试使用 python 列表填充矩阵
- javascript - 无法使用 three.js 和 ObjLoader2 加载 obj 文件
- c# - EF Core 无法执行数据库更新命令:“失败:Microsoft.EntityFrameworkCore.Database.Command[20102]”
- python - 连接方法调用结果
- azure - 如何使用 Azure DevOps 在 Azure 中部署和管理 docker 实例?