Lock x axis rotation when using OrbitControls - Three.js

前端 未结 1 1985
情书的邮戳
情书的邮戳 2021-02-11 05:27

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

1条回答
  •  隐瞒了意图╮
    2021-02-11 05:46

    For your OrbitControls instance set

    controls.minPolarAngle = Math.PI/2;
    controls.maxPolarAngle = Math.PI/2;
    

    0 讨论(0)
提交回复
热议问题