Convert World Location To Screen Location problem when I look away

Hello!
I have a problem with the function mentioned above.

So I use this script:

This actually works: I see my widget above the actor, but when I look away and back, the widget disappears.
I couldn’t figure out why is this happening so have you guys any idea?

Thanks!

1 Like

I got it!

It’s not an issue coming from the Convert World Location To Screen Location node.
The core problem is that widgets don’t tick anymore when they’re off screen so they get no chance to position themselves back in this setup.
One solution is to position the widget from a different object’s tick, such as the Character (since this widget is referencing the character anyways).

1 Like

You did not just post a solution to your own question 8 years later… :1st_place_medal:

1 Like

It was a mighty elusive problem but I finally cracked it!
Now, to continue this little project of mine. :))

1 Like

Btw, Widget Components can be set to tick off screen.

1 Like

This is true, and good to mention.
My original example was an on-screen widget and I tried to set the position on the viewport, rather than in the world.

As far as I can tell, widget components can’t be put on screen, can they?

Yeah, they can! :slight_smile: They live in world space. Even when working in Screen Mode, it still works. And even in extreme cases where a regular widget would fail (like x:51.200, y:80.000 or something), a component will still work. Also, they automatically track and convert world → screen position, so no need for additional Tick - because that’s how you’re tracking the widgets now, right? Widgets move themselves out of the screen and are unable to come back. :sweat_smile:

1 Like

I just tried it and oh my god, this is real! :smile: I never clicked that Space button to see what “Screen” does.
Well, I definitely learned something today!

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