Oh boy!
Figured it out, i don’t know if it’s a good way of doing it… but this post gave me the solution!
- position a mesh ( with PlaneGeomtrey ) a the location i want, after rotation and moving to it’s position.
- Next you can access it’s BoundingBox and get 3 corner points from it.
2.1. ( Don’t forget to convert from localToWorld ) - then it’s as simple as plane.setFromCoplanarPoints() !!
///target == the rotated/positioned mesh with PlaneGeometry
target.updateMatrixWorld(true);
target.geometry.computeBoundingBox();
if (target.geometry.boundingBox) {
const { min: topLeft, max: bottomRight } = target.geometry.boundingBox.clone();
const bottomLeft = new Vector3(topLeft.x, bottomRight.y, topLeft.z);
target.localToWorld(topLeft);
target.localToWorld(bottomLeft);
target.localToWorld(bottomRight);
cuttingPlane.setFromCoplanarPoints(topLeft, bottomRight, bottomLeft);
}
I hope this saves someone a lot of time! and if this can be achieved with a better method, i’m all ears