When using three.js in my A-Frame scene, I am trying to obtain the bounding box of objects.
let boundingBox = new THREE.Box3().setFromObject(element.object3D);
However, the 6 values in the boundingBox always default to Infinity or -Infinity as stated in Three.Box3.
I have attempted this with a simple a-box in the A-Frame basic example and my own gltf 2.0 model.
Explore my project here:
If anyone knows the reason behind this or other methods to obtain bounding box in A-Frame, I would greatly appreciate your help.
Thank you for any assistance provided.