我可以将相机从默认位置平[0,0,0]
移到[100,100,0]
使用鼠标OrbitControls
。但是仍然无法通过代码进行平移。
<Canvas
camera={{
position: [0, 0, 100],
up: [0, 0, 1],
}}
>
<OrbitControls />
<ambientLight />
<FakeSphere position={[0, 0, 0]} color="red" />
<FakeSphere position={[100, 100, 0]} color="blue" />
</Canvas>
请有任何想法。