# GetActorBounds affected by rotation

**URL:** <https://forums.unrealengine.com/t/getactorbounds-affected-by-rotation/338940>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [November 18, 2015, 7:12pm UTC](https://forums.unrealengine.com/t/getactorbounds-affected-by-rotation/338940 "2015-11-18T19:12:20Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![nejo.quol](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nejo.quol](https://forums.unrealengine.com/u/nejo.quol)\
**Post date:** [March 10, 2024, 3:39pm UTC](https://forums.unrealengine.com/t/getactorbounds-affected-by-rotation/338940/9 "2024-03-10T15:39:22Z")

</div>

I know it is old, but in case someone needs the answer:

```auto
void UYourClass::GetComponentOrientedBoundingBox(USceneComponent* Component, FVector& Origin, FVector& Extent)
{
	// Calculate the right world origin
	FVector ComponentExtent;
	float ComponentRadius;
	UKismetSystemLibrary::GetComponentBounds(Component, Origin, ComponentExtent, ComponentRadius);

	// Calculate the right extent
	auto Box = Component->GetOwner()->CalculateComponentsBoundingBoxInLocalSpace(); 
	Extent = Box.GetExtent();
}

```

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/b/a/eba52dceacbe2ab52db050b2c8e9108774869913.png)

---

_[View the full topic](https://forums.unrealengine.com/t/getactorbounds-affected-by-rotation/338940)._
