# Get actor location in another actor coordinate system

**URL:** <https://forums.unrealengine.com/t/get-actor-location-in-another-actor-coordinate-system/1211510>\
**Category:** Blueprint\
**Tags:** coordinates, world-space, unreal-engine, Blueprint, question\
**Created:** [June 26, 2023, 8:55pm UTC](https://forums.unrealengine.com/t/get-actor-location-in-another-actor-coordinate-system/1211510 "2023-06-26T20:55:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![JediKnightChan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jediknightchan/32/1156960_2.png) [@JediKnightChan](https://forums.unrealengine.com/u/JediKnightChan)\
**Post date:** [June 26, 2023, 8:55pm UTC](https://forums.unrealengine.com/t/get-actor-location-in-another-actor-coordinate-system/1211510/1 "2023-06-26T20:55:07Z")

</div>

I have this actor and I want to know if my character is behind it (green arrow) or not (red arrow)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/d/e/7de8ebfafd225275845d7a4f8430d096c81f2c17.jpeg)

So I’d like to convert my character world transform to relative coordinate space of another actor. What I tried:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/d/4/6d4e42139b30c4760fa92187e07fc95d64256b39.png)

But moving one one side of the railing, didn’t get persistently negative or positive axis coord on print debug.

---

<div class="post-metadata">

**Author:** ![JediKnightChan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jediknightchan/32/1156960_2.png) [@JediKnightChan](https://forums.unrealengine.com/u/JediKnightChan)\
**Post date:** [June 26, 2023, 9:03pm UTC](https://forums.unrealengine.com/t/get-actor-location-in-another-actor-coordinate-system/1211510/2 "2023-06-26T21:03:36Z")

</div>

Not actual answer to the topic mentioned, but anyway helped me to understand if it’s behind or in front. In my case I used right vector instead of forward (as I wanted Y axis)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/d/c/2dc45b23b64a48c6347a7bdd21f5d09ae3627c0e.png)

---

<div class="post-metadata">

**Author:** ![rokenrock](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rokenrock/32/1040844_2.png) [@rokenrock](https://forums.unrealengine.com/u/rokenrock)\
**Post date:** [June 26, 2023, 9:08pm UTC](https://forums.unrealengine.com/t/get-actor-location-in-another-actor-coordinate-system/1211510/3 "2023-06-26T21:08:34Z")

</div>

I’d recommend using look at rotation. You current setup would only work in extremely specific conditions.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/d/a/bda7b49a8a9339c8a6a62aaddb924bd3a41b6b8e.jpeg)

Here’s the post I made that briefly goes over it. Ignore the TriggerBox part of it.

> [@load and unload using same trigger](https://forums.unrealengine.com/t/load-and-unload-using-same-trigger/1175191/2):
>
> The easiest way to implement this while keeping your sanity in check would probably be to have a trigger blueprint that uses the difference in positions. I would highly recommend adding an arrow component so you can tell which way the trigger box is facing when placing it. [image] This evaluates to true if in front, false if behind. Keep the X & Y of the trigger box rotation 0. This does not work as intended with crazy rotations. We simply find the rotation from the trigger box to…

---

<div class="post-metadata">

**Author:** ![JediKnightChan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jediknightchan/32/1156960_2.png) [@JediKnightChan](https://forums.unrealengine.com/u/JediKnightChan)\
**Post date:** [June 26, 2023, 9:14pm UTC](https://forums.unrealengine.com/t/get-actor-location-in-another-actor-coordinate-system/1211510/4 "2023-06-26T21:14:16Z")

</div>

No, it works fine, just doesn’t anwer the topic

---

<div class="post-metadata">

**Author:** ![rokenrock](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rokenrock/32/1040844_2.png) [@rokenrock](https://forums.unrealengine.com/u/rokenrock)\
**Post date:** [June 26, 2023, 9:15pm UTC](https://forums.unrealengine.com/t/get-actor-location-in-another-actor-coordinate-system/1211510/5 "2023-06-26T21:15:18Z")

</div>

I’m talking about this.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/5/e/c5e2fe427da4e56ad9db2a78a061aa2466a3d228.png)

---

<div class="post-metadata">

**Author:** ![JediKnightChan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jediknightchan/32/1156960_2.png) [@JediKnightChan](https://forums.unrealengine.com/u/JediKnightChan)\
**Post date:** [June 26, 2023, 9:16pm UTC](https://forums.unrealengine.com/t/get-actor-location-in-another-actor-coordinate-system/1211510/6 "2023-06-26T21:16:59Z")

</div>

Ah, yeah, that was an example of non-working attempt of solution, I’m just pretty sure the actual answer (to the topic) includes that function, convert transform to relative, or something similar

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [July 26, 2023, 9:17pm UTC](https://forums.unrealengine.com/t/get-actor-location-in-another-actor-coordinate-system/1211510/7 "2023-07-26T21:17:29Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
