# Accurate OBB for GLTF (Oriented Bounding Box)

**URL:** <https://discourse.threejs.org/t/accurate-obb-for-gltf-oriented-bounding-box/50942>\
**Category:** Questions\
**Tags:** obb\
**Created:** [April 27, 2023, 5:29pm UTC](https://discourse.threejs.org/t/accurate-obb-for-gltf-oriented-bounding-box/50942 "2023-04-27T17:29:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicorne](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/nicorne/32/35771_2.png) [@Nicorne](https://discourse.threejs.org/u/Nicorne)\
**Post date:** [April 27, 2023, 5:29pm UTC](https://discourse.threejs.org/t/accurate-obb-for-gltf-oriented-bounding-box/50942/1 "2023-04-27T17:29:25Z")

</div>

Hi all,  
I am struggling with OBB and could really use a little help to get me going.  
For some reason, I cannot create an OBB with the right size, position and rotation:  
OBB → red box  
AABB → yellow box  
 ![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/9/5/9560ea6877a868e1ff5f6a66ecbdddb9ec24312d.png)

I am now familiar with the OBB documentation and the few examples online.  
What I am missing?  
I replicated what I am doing here: [UZI demo - JSFiddle - Code Playground](https://jsfiddle.net/gh2bz13j/85/)

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [April 27, 2023, 7:24pm UTC](https://discourse.threejs.org/t/accurate-obb-for-gltf-oriented-bounding-box/50942/2 "2023-04-27T19:24:39Z")

</div>

Try it like so: [UZI demo - JSFiddle - Code Playground](https://jsfiddle.net/mcpsx8b3/)

The following line was wrong:

```js
bbox.applyMatrix4(child.matrix);

```

If you setup the box for visualizing the OBB like in your app, it’s sufficient to just copy the OBB’s center to the box’s position property.
