I have a wall mesh like so that I get the bounding box of. However the bounding box is of the original mesh, not after the transforms. Is there a way to get the bounding box of a transformed mesh?
const planeMesh = new THREE.Mesh(planeGeometry, planeMaterial);
planeMesh.translateX(middleX);
planeMesh.translateY(wallHeightOver2);
planeMesh.translateZ(middleZ);
if (x1Position == x2Position) {
planeMesh.rotateY(Math.PI / 2);
};
console.log(planeMesh);
// maybe planeMesh.geometry doesn't update?
planeMesh.geometry.computeBoundingBox();
wallHitBoxes.push(planeMesh.geometry.boundingBox);
scene.add(planeMesh);