ThreeJS相机未从顶部看物体

时间:2019-11-27 08:05:37

标签: reactjs three.js

我正在将相机放置在物体位置, 但是相机并未从顶部看物体。我该怎么做?

const box = new THREE.Box3();
box.expandByObject(this.object);
const center = box.getCenter(new THREE.Vector3());

this.controls.minDistance = center.y + 1;

this.controls.target = new THREE.Vector3(
    this.threeDisplayPoint.x,
    this.threeDisplayPoint.y,
    this.threeDisplayPoint.z
);
this.tl = new TimelineMax();
this.tl.to(this.camera.position, 0.8, {
    ...center,
    y: center.y+1,
    ease: Expo.easeOut
});

我想要这个; enter image description here

我的代码像这样工作 enter image description here

我该怎么做?

0 个答案:

没有答案