# Updating bounding box issue

**URL:** <https://discourse.threejs.org/t/updating-bounding-box-issue/51047>\
**Category:** Questions\
**Tags:** obb\
**Created:** [May 1, 2023, 1:10pm UTC](https://discourse.threejs.org/t/updating-bounding-box-issue/51047 "2023-05-01T13:10:58Z")\
**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:** [May 1, 2023, 1:10pm UTC](https://discourse.threejs.org/t/updating-bounding-box-issue/51047/1 "2023-05-01T13:10:58Z")

</div>

Hi all,

I create a bounding box using OBB (Oriented Bounding Box) and it works fine:

 ![Screenshot 2023-05-01 at 15.01.45](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/4/4/442a051975aba0051920cdb275486ef9236158c8.png)

But when I update the box position and rotation to match my object’s position and rotation it shifts the bounding box:

 ![Screenshot 2023-05-01 at 15.00.45](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/8/6/8692d1fb093baf70630dc03912b83fa348880dd3.png)  
What’s curious is that I happen to do the same 90° rotation around the Z axis in Blender before exporting the object.  
In Blender, I select my object in “object mode”, I then press the “R” key, then the “Z” key, then press “90” to apply a 90° rotation and I export a compressed .glb file.

I reproduced the issue here: [Bounding box issue - JSFiddle - Code Playground](https://jsfiddle.net/o401av28/62/)

Thanks for your help 😊

---

<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:** [May 2, 2023, 4:15am UTC](https://discourse.threejs.org/t/updating-bounding-box-issue/51047/2 "2023-05-02T04:15:59Z")

</div>

> [@Nicorne](#):
>
> What’s curious is that I happen to do the same 90° rotation around the Z axis in Blender before exporting the object.  
> In Blender, I select my object in “object mode”, I then press the “R” key, then the “Z” key, then press “90” to apply a 90° rotation and I export a compressed .glb file.

To fix this issue, I simply had to apply the rotation to the object in Blender before exporting, so that its local coordinate system is reset.

Here are the steps in Blender:

1. Select the object in Blender.
2. Press Ctrl/Cmd + A to open the “Apply” menu.
3. Choose “Rotation” from the menu. This will apply the rotation and reset the object’s local coordinate system.
