I have this actor and I want to know if my character is behind it (green arrow) or not (red arrow)
So I’d like to convert my character world transform to relative coordinate space of another actor. What I tried:
But moving one one side of the railing, didn’t get persistently negative or positive axis coord on print debug.
1 Like
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)
rokenrock
(rokenrock)
June 26, 2023, 9:08pm
3
I’d recommend using look at rotation. You current setup would only work in extremely specific conditions.
Here’s the post I made that briefly goes over it. Ignore the TriggerBox part of it.
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.
[image]
We simply find the rotation from the trigger box to…
No, it works fine, just doesn’t anwer the topic
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
system
(system)
Closed
July 26, 2023, 9:17pm
7
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.