New THREE.OBB() is not a constructor

Hello,

i ve seen in documentation it does exist obb ( oriented bounding box )
three.js docs
but when i have tried to create a new THREE.OBB() i ve got an error message
THREE.OBB is not a constructor .
i have searched in Three.js and indeed there is no obb inside .
question : what file.js i have to use to be able to create new oriented bounding box object ?

thank .

Hi!
In the example you’ve linked, there is that line in the beginning:
import { OBB } from './jsm/math/OBB.js';
OBB is not a part of the core.
Also, you don’t need THREE namespace, just do it like this: var obb = new OBB();

2 Likes

thank you very much for the answer , now im able to create a new OBB. :sunglasses:

i does try this objet and i come back to give feedback

it is working very well . I get better result than AABB . the oriented bounding box is very great .

thank you very much .

1 Like