# BoundingBox wrong calculation with Skinned Meshes?

**URL:** <https://discourse.threejs.org/t/boundingbox-wrong-calculation-with-skinned-meshes/48204>\
**Category:** Questions\
**Tags:** skinned-mesh, bounding-box, mesh, geometry\
**Created:** [February 18, 2023, 9:51pm UTC](https://discourse.threejs.org/t/boundingbox-wrong-calculation-with-skinned-meshes/48204 "2023-02-18T21:51:40Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [February 19, 2023, 8:37pm UTC](https://discourse.threejs.org/t/boundingbox-wrong-calculation-with-skinned-meshes/48204/3 "2023-02-19T20:37:06Z")

</div>

You can compute a perfect bounding box manually if you want:

> [@Accurate GLTF bounding box](https://discourse.threejs.org/t/accurate-gltf-bounding-box/45410/5):
>
> Here’s code for accurately fitting a THREE.Box3 to a THREE.SkinnedMesh — const vector = new THREE.Vector3(); const box = new THREE.Box3().makeEmpty(); const position = mesh.geometry.attributes.position; for ( let i = 0, il = position.count; i \< il; i ++ ) { vector.fromBufferAttribute( position, i ); mesh.boneTransform( i, vector ); mesh.localToWorld( vector ); box.expandByPoint( vector ); } The code above computes the bounding box in world space; omit localToWorld if you prefer local sp…

But usually it’s too expensive to do that every frame as a character moves, and so the default bounding box computation doesn’t try to take armatures into account.

---

_[View the full topic](https://discourse.threejs.org/t/boundingbox-wrong-calculation-with-skinned-meshes/48204)._
