Download

UMG Widget Animation Access in Actor Blueprint?

Hey everyone! I am trying to show a 3D Widget and play it’s animation when walking into a bounding box in an actor blueprint. I’ve created the widget blueprint, where I created an animation track and keyed the alpha of the image.
b5e4cdcd7c57384d62d97b076d169825026b4d33.jpeg
This animation is available as a variable in the widget blueprint event graph:
25194479dfab3c87de42b9163ea8c9c57975733c.jpeg
I then brought this widget into an actor blueprint, where I want the 3d widget to show when I enter the bounding box. I set the visibility of the widget to invisible from the start, and then show it when you walk through the bounding box. I also want the animation to play on the widget each time this happens, so that the widget fades in, shows for a few seconds, and then fades out. This would also happen when pressing the “Gamepad Special Right” button.
0f395cd02803b8b3eaf27e72835c181aff20317e.jpeg

My main problem is that I don’t understand how to hook up the blueprint so that it triggers the animation to play when you enter the bounding box or when you press the gamepad button. Any help would be greatly appreciated! Thanks!

Barry Zundel

Hi.

Is your widget attached as a component to another actor?
Lets assume it is.

This is what i would have done but there are probably other ways to go about it.

My widget would be a component on an Actor BP.

This actor blueprint would trigger an event if the player overlaps the bounding box that sets the visibility.
( i would do this by controlling it through what triggers overlapping events on the boundingbox of the actor)

I would have a blueprint interface with a simple event. Add the interface on the widget blueprint properties.
Have an event that restarts the animation or do what ever it is for the animation that is required and send a message to that interface event by dragging from the widget component.

Does this make sense?
I hope it does.

I quickly tested it and seems to be working fine.