Drag object locked at certain distance/radius from camera view

心已入冬 提交于 2019-12-22 18:04:06

问题


I have a camera in the center of the scene, 1 sphere at z=400 distance from the camera, with it's parent in the center.

I want to drag the sphere up/down/left/right from the view but at the same time not change it's z - position from the center.


回答1:


I ended up using another sphere and make it invisible, add side: THREE.DoubleSide to the material and use it for raycasting.



来源:https://stackoverflow.com/questions/19364909/drag-object-locked-at-certain-distance-radius-from-camera-view

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!