World Building
Collision Bounds
What this shows
Visualize oriented bounds around a moving object.
Loading scene…Key API excerpt
Key API excerpt
import * as EASEL from "@xsyetopz/easel";
const bounds = new EASEL.Box3().setFromCenterAndSize(
new EASEL.Vector3(),
new EASEL.Vector3(1.8, 1.8, 1.8),
);
const a = new EASEL.OBB().fromBox3(bounds).applyMatrix4(boxA.matrixWorld);
const b = new EASEL.OBB().fromBox3(bounds).applyMatrix4(boxB.matrixWorld);
const overlaps = a.intersectsOBB(b);