# I would like to know the coordinates of the left and right side of the actor, within the Y axis.

**URL:** <https://forums.unrealengine.com/t/i-would-like-to-know-the-coordinates-of-the-left-and-right-side-of-the-actor-within-the-y-axis/2379060>\
**Category:** C++\
**Tags:** unreal-engine, question\
**Created:** [March 7, 2025, 8:59am UTC](https://forums.unrealengine.com/t/i-would-like-to-know-the-coordinates-of-the-left-and-right-side-of-the-actor-within-the-y-axis/2379060 "2025-03-07T08:59:23Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [March 7, 2025, 9:52am UTC](https://forums.unrealengine.com/t/i-would-like-to-know-the-coordinates-of-the-left-and-right-side-of-the-actor-within-the-y-axis/2379060/2 "2025-03-07T09:52:02Z")

</div>

You are going to have to do some extra work to get the bounds depending on the actor rotation. I’m guessing you’ll want the left and right side no matter the orientation of the actor. If you just use actor bounds then once you start rotating the actor for instance 45 deg you will no longer get the side of the meshes

You would probably need to rely on get local bounds with some extra steps like shown here

> [@Oriented bounding box from GetLocalBounds](https://forums.unrealengine.com/t/oriented-bounding-box-from-getlocalbounds/241396/2):
>
> Figured out the box was off-center. Also figured out you can get the mesh from the meshcomponent and via that get to a bounds object. Came up with this in the meanwhile:

The extent only has half of the distance so 50 and not a 100 because it’s extending from the origin (the center of the actor in this case). Think of it like the radius of a circle. It’s not the distance from edge to edge but from the origin to the side of the bounding box.

Something like this:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/4/8/548889610c176ac080c30a4b82209eaf58dc0f4e.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/0/e/f0e165255c924c86a1df768ab7f5d808501fe860.jpeg)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/6/a/66a978b21655e8f8c77926d49989cc38d8d945d9.png)

The centers of the debug boxes are the oriented points of the extremes of the mesh

Further changes in the code would depends on the use case. Are you rotating your components or scaling them etc.

* * *

For the full actor left and right:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/4/d/84de254526f1114c0b82c8cad7af977c545d09d1.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/b/5/2b596d05fe8a08bbb6195d6b6fe54bd904953598.png)

Because the bounding box is not oriented you have to temporarily set the rotation to zero to get the bounds =\> cache it =\> revert rotation and then rotate the vector to get the final output

**Simplified to just a function call:**

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/8/f/f8ffaf834a526613f8a7a160565b9825a4692603.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/8/f/c8fb460a3b38ce3c3df711fec39ca80c7d151e71.jpeg)

---

_[View the full topic](https://forums.unrealengine.com/t/i-would-like-to-know-the-coordinates-of-the-left-and-right-side-of-the-actor-within-the-y-axis/2379060)._
