RedditPP Mascot

RedditPP

r/unrealengine • … • u/goodwarrior12345

Converting line trace to local space seems to not work properly with nested blueprints

Hi everyone! I'm trying to make a control panel of sorts where you click or press an interact button while looking at a control element and the control on that element moves depending on where you were looking. [Here's an example.](https://postimg.cc/Cdjp0wxS)

In order to do this, and to avoid doing computations in world space, I first convert the trace impact point into local space [using this logic](https://postimg.cc/jCZ2T6j3), and then use the local space version of the impact point to do further calculations. This works perfectly fine if I just place my blueprint into the level.

However, if I then put that control element inside another blueprint as a Child Actor Component, my logic starts working all weird, and I can't see a reason why it would do that. When I look at the debug info, it seems like my World to Local macro [does absolutely nothing to the point when my slider is located inside another blueprint.](https://postimg.cc/rdH6gmyC) Why is that? And what do I do to work around this? Is this even the right way of doing what I'm trying to achieve - determining where exactly on the object the trace hit?

Thanks!

— 0