Lock x axis rotation when using OrbitControls - Th

2020-06-28 05:57发布

问题:

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:

For your OrbitControls instance set

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