Closed Yty202020 closed 3 years ago
Hehe, I don't understand quaternions either. But convert to a rotation representation you understand and apply the constraint at the application code level after the update() call.
spinControl.update();
const objectOri = new THREE.Euler( 0, 0, 0, 'YXZ' );;
objectOri.setFromQuaternion(spinControl.object.quaternion);
if (objectOri.y > 1) {
objectOri.y = 1; // a silly constraint
}
spinControl.object.quaternion.setFromEuler(objectOri);
thank a lot
hi brother i want to limit the obj-3d spin like the OrbitControls.max(min)AzimuthAngle、max(min)PolarAngle i think may change this part to add limit ` return function applyVelocity() {
` But im just a ui-d . I try to learn "quaternion" . emmm i want to die