三JS:如何克服万向节锁定

时间:2019-10-10 17:19:55

标签: three.js

我试图在按钮单击中将摄像机移至左,右,上,下,前和顶视图,在此我捕获了该轴并将其设置为摄像机位置,在此我获得了云台锁定旋转不起作用的地方。而尝试旋转我放大的相机的对象时。我的代码做错了什么?

public testViews() {

    const that = this;
    let axisHelper;
    let distance;
    axisHelper = new Vector3(0, 0, 1);
    that.cameraHandler.cameraProperties.eye.copy(axisHelper);
    that.camera.lookAt(that.cameraHandler.cameraProperties.center.clone());
    that.cameraHandler.cameraProperties.eye = that.cameraHandler.cameraProperties.center.clone();
    return;
}

0 个答案:

没有答案