ThreeJS如何移动场景的中心协调?(ThreeJS How to move the center coordination of the scene?)
我试图将场景的中心从网格的中心X移动到最低的x点(地面交叉点)? 因为我需要使用Raycaster根据中心(0,0,0)检查交叉点?
I am trying to move the center of the scene from the center X of the mesh to the lowest x point (floor intersection) ? as I need to inspect intersection point according to the center (0,0,0) using Raycaster ?
最满意答案
如果geometry.boundingBox未定义,那么你可以通过计算它
geometry.computeBoundingBox ()它更新了geometry.boundingBox属性。
然后,您可以使用geometry.boundingBox.min和geometry.boundingBox.max来计算移动模型的数量。
if geometry.boundingBox is undefined then you can compute it by
geometry.computeBoundingBox ()which updates the geometry.boundingBox attribute.
Then you can use geometry.boundingBox.min and geometry.boundingBox.max to figure out how much to move your model.
更多推荐
发布评论