【问题标题】:Can you limit three.js device orientation controls the same as orbit controls可以限制three.js 设备方向控件与轨道控件相同吗
【发布时间】:2015-04-08 20:47:13
【问题描述】:

简单的问题,设备方向控制似乎没有很好的文档记录。 我知道使用轨道控制您可以执行以下操作:

 controls.minPolarAngle = Math.PI / 2 - 0.2;
 controls.maxPolarAngle = Math.PI / 2 - 0.7;

设备方向控制有类似的东西吗?

【问题讨论】:

  • 有人知道吗www

标签: ios three.js device-orientation


【解决方案1】:

在调用setObjectQuaternion之前,尝试在更新函数中添加:
beta = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, beta));

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-07-14
    • 1970-01-01
    • 1970-01-01
    • 2013-09-01
    相关资源
    最近更新 更多