Reputation: 4633
I have a scene with a THREE.Object3D object in it. The object consists of several child objects, so it does not have geometry directly.
How can I position and focus the camera to look at the object?
Upvotes: 0
Views: 182
Reputation: 19602
camera.position.copy( object.position );
camera.position.z += object.geometry.boundingSphere.radius;
camera.lookAt( object );
Upvotes: 3