How can I interact with a 3d widget in screenspace with widget component

I have a 3d waypoint widget in screen space, I want it to play a little timeline animation when I look at it and reverse when I stop looking at it, nothing fancy.

Currently when you hover over the widget, nothing happens.

I have the widget presets set to block a custom channel “waypointchannel”, and to ignore all other channels. Everything else in the world is set to ignore waypointchannel, as I selected ignore as the default interaction when creating the channel. The widget interaction component is set to use waypointchannel.

I believe I set up the channels and widget interaction correctly, it’s all in range, the widget actor bp is set to block waypointchannel, and the widget interaction component is set to use waypoint channel, but I can’t get anything to happen how I would expect with a normal 3d widget.

I expect the issue is that the widget is in screenspace and my interaction source is not screen, it is world maybe?

Any ideas? Thanks!

In the widget component:

And the Widget Interaction Component is not needed here - not if you’re using a mouse. The interaction comp comes in handy if there’s no mouse cursor.

1 Like

It is grayed out and untoggleable

Oh, my bad, did not read that correctly, you’re already in screen space, right? Then there are additional requirements. Why are you using an interaction component? It’s there to specifically work with in world space.

1 Like

Yes the widget is in screen space, the interaction component is on a vehicle that must face the waypoint, so its source is in world

The Widget Interaction Component traces in the world space and attempts to hit the widget component’s quad mesh. It cannot hit screenspace widgets. You need another solution.

1 Like

Do you have any suggestions? I enjoyed the screenspace widget for staying the same size regardless of distance and being rendered through objects, but unfortunately this is essential to its use

I am a bit baffled:

Currently when you hover over the widget, nothing happens.

vs

the interaction component is on a vehicle that must face the waypoint

So, by hovered, you do not mean the mouse cursor at all, right? But, instead, a vehicle tracing (via the interaction component) using screen centre.

Assuming the widget belongs some sort of Point of Interest actor existing in the world space, you could add a simple sphere collider and then do a regular trace (no interaction component needed). But there may be issues to address - like the size of the collider sphere. This may be irrelevant in the top down / isometric view, though.

Not sure I’m getting the whole picture atm, feels like stumbling in the dark a bit. Any chance for a crude overview of the scene?

Sorry for the confusion, I was thinking when you point the vehicles interaction component over the screenspace widget that would be considered hovering, but if I enable mouse input I can hover it normally, I didn’t understand that you could not interact from world → screen space.

I wanted to be able to point the vehicle at the waypoint, and have it play an animation indicating that you may go there

You nailed it here, in the critical bit I did not read somehow…


Afaik: the quad to trace against is not there while we’re in the screen space mode. I struggled with this once when trying to make a retainer do uncanny things.

  • a sphere collision that scales with distance could work well enough - does not need to be ticked, you may update it once per second or every less frequently
  • technically you can Draw at Desired Size (in world space) but it’s somewhat expensive:

image

Or scale the component. And it need rotation to match the camera. Not sure if a neat solution exits here.

1 Like

Thank you for the suggestions, but one last question, If I were to draw it at desired size, how would I render the widget through other objects?

Like seen here

You can disable depth in the material:

1 Like

Thank you for the suggestions and resources, and thanks for the map that you released, I used that as a foundation and learned a lot from tearing it apart!

1 Like

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