# Difficulty getting FBox from StaticMeshComponent

**URL:** <https://forums.unrealengine.com/t/difficulty-getting-fbox-from-staticmeshcomponent/440831>\
**Category:** Asset Creation\
**Tags:** staticmeshcomponent, unreal-engine, CPP, question\
**Created:** [January 8, 2019, 1:44am UTC](https://forums.unrealengine.com/t/difficulty-getting-fbox-from-staticmeshcomponent/440831 "2019-01-08T01:44:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevincvanhorn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kevincvanhorn](https://forums.unrealengine.com/u/kevincvanhorn)\
**Post date:** [January 8, 2019, 1:44am UTC](https://forums.unrealengine.com/t/difficulty-getting-fbox-from-staticmeshcomponent/440831/1 "2019-01-08T01:44:52Z")

</div>

Hello!

I’m looking for a way to calculate a tight FBox around a StaticMeshComponent that rotates with the component, keeping the same volume and orientation.

![264526-bounding.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/0/a/30a68f4444890d1818b9bfeacf6fc3f06b1a4cb5.png)

---

<div class="post-metadata">

**Author:** ![kevincvanhorn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kevincvanhorn](https://forums.unrealengine.com/u/kevincvanhorn)\
**Post date:** [January 9, 2019, 5:10am UTC](https://forums.unrealengine.com/t/difficulty-getting-fbox-from-staticmeshcomponent/440831/2 "2019-01-09T05:10:55Z")

</div>

Unfortunately, this capability is not available for FBox, which by nature is an Axis-Aligned Bounding Box.

- [Good explantation on Stack Overflow.](https://stackoverflow.com/questions/22512319/what-is-aabb-collision-detection)

- [UE4 Documentation](https://api.unrealengine.com/INT/API/Runtime/Core/Math/FBox/index.html)

For anyone looking to do something like this, I ended up using UStaticMeshComponent::OverlapComponent().  
Code for overlapping a staticmesh with a foliage instance bounding box:

`FCollisionShape QueryBox = FCollisionShape::MakeBox(InstanceBox.GetExtent());`

`return MeshIn.OverlapComponent(InstanceBox.GetCenter(), FQuat::Identity, QueryBox);`
