# Getting the bounding box of a static mesh collision data

**URL:** <https://forums.unrealengine.com/t/getting-the-bounding-box-of-a-static-mesh-collision-data/123150>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [March 5, 2019, 12:10am UTC](https://forums.unrealengine.com/t/getting-the-bounding-box-of-a-static-mesh-collision-data/123150 "2019-03-05T00:10:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_f3fb80e6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f3fb80e6](https://forums.unrealengine.com/u/anonymous_user_f3fb80e6)\
**Post date:** [March 5, 2019, 12:10am UTC](https://forums.unrealengine.com/t/getting-the-bounding-box-of-a-static-mesh-collision-data/123150/1 "2019-03-05T00:10:38Z")

</div>

I have a static mesh imported into my project, which includes simple and complex collision data. I can see both fine in the UE4 mesh editor.  
Now I want the bounding box of the simple collision data of a given UStaticMeshComponent in C++. Is there an easy way to achieve this?

---

<div class="post-metadata">

**Author:** ![BoBosan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BoBosan](https://forums.unrealengine.com/u/BoBosan)\
**Post date:** [March 8, 2019, 2:03am UTC](https://forums.unrealengine.com/t/getting-the-bounding-box-of-a-static-mesh-collision-data/123150/2 "2019-03-08T02:03:14Z")

</div>

Assume that we’re in AActor class.  
To get Bound in world space.

```auto

// First option.
UStaticMeshComponent* StaticMeshComp = FindComponentByClass<UStaticMeshComponent>();
const FTransform WorldTransform = StaticMeshComp->GetComponentTransform();
FBoxSphereBounds WorldBound1stOption = StaticMeshComp->CalcBounds(WorldTransform);

// Second option.
UStaticMeshComponent* StaticMeshComp = FindComponentByClass<UStaticMeshComponent>();
StaticMeshComp->UpdateBounds();
FBoxSphereBounds WorldBound2ndOption = StaticMeshComp->Bounds;

```

To get Bound in Local space.

```auto

UStaticMeshComponent* StaticMeshComp = FindComponentByClass<UStaticMeshComponent>();
UStaticMesh* StaticMesh = StaticMeshComp->GetStaticMesh();
FBoxSphereBounds LocalBound = StaticMesh->GetBounds();

```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f3fb80e6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f3fb80e6](https://forums.unrealengine.com/u/anonymous_user_f3fb80e6)\
**Post date:** [March 8, 2019, 10:10am UTC](https://forums.unrealengine.com/t/getting-the-bounding-box-of-a-static-mesh-collision-data/123150/3 "2019-03-08T10:10:03Z")

</div>

Hey, thanks for your reply. I was not looking for the bounds of the mesh though, but for the bounds around the simple collision of that mesh. However, I found the solution here:

> **[Getting the bounding box of a static mesh collision data](https://forums.unrealengine.com/questions/879563/view.html)**
>
> I have a static mesh imported into my project, which includes simple and complex collision data. I can see both fine in the UE4 mesh editor. Now I want the bounding box of the simple collision data of a given UStaticMeshComponent in C++. Is there an...
