问题描述
限时送ChatGPT账号..我需要能够改变旋转轴而不改变三点上的相机外观.TrackballControls 无论我尝试过什么,我都无法成功.请给我一个方向来解决这个问题.我真正想要实现的是像鼠标控件一样的 Revit.
I need to be able to change rotation pivot without changing camera lookAt on THREE.TrackballControls no mater what I tried I could not succeed. Please give me a direction to solve this problem. What I am actually trying to achieve is Revit like mouse controls.
推荐答案
我能够通过创建 2 个名为轨道和目标的 3D 对象,然后将目标和相机作为子对象添加到轨道中来解决这个问题......相机总是看起来在 target.position,x 轴上的 mousemove 围绕 Z 轴旋转轨道对象(因此目标和相机围绕轨道旋转),y 轴上的 mousemove 围绕 cameraSideways 方向旋转相机臂(camera.position 矢量).
I was able to solve this problem by creating 2 3D objects named orbit and target, then add target and camera into orbit as child objects... camera always looks at target.position, mousemove on x axis rotates the orbit object around Z axis (hence target and camera rotates around the orbit) and mousemove on y axis rotates the camera arm (camera.position vector) around cameraSideways direction.
这篇关于如何更改 TrackballControls 上的旋转轴心点但保持 camera.lookAt 位置不变?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论