最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Lock x axis rotation when using OrbitControls - Three.js - Stack Overflow

programmeradmin2浏览0评论

Is it feasible to lock the x axis rotation when using OrbitControls? Currently I have an object model of a christmas star hung on a string. I want it to rotate only horizontally.

Is it feasible to lock the x axis rotation when using OrbitControls? Currently I have an object model of a christmas star hung on a string. I want it to rotate only horizontally.

Share Improve this question asked Dec 14, 2016 at 5:40 Safal PillaiSafal Pillai 1,6371 gold badge17 silver badges31 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 23

For your OrbitControls instance set

controls.minPolarAngle = Math.PI/2;
controls.maxPolarAngle = Math.PI/2;
发布评论

评论列表(0)

  1. 暂无评论