Hey everyone! I’m graduating in university and struggling with my diploma work. The work is pretty simple: i have a UE project with mechanized coal mining equipment. This is a real equipment, which will be used in coal mining companies in the nearest future. I have an environment, 3d-modeled mining machines, and ready-to-use animations.
I need to set up animations inside Unreal, so that they will be played with the button clicked. I’ve already made a ui-widget, but have no idea how to make everything work properly. Some renders to understand what it looks like:
As you can see, there is a roadheader and a mechanized complex, which literally walks along with the roadheader to protect it from mine collapse (and saves miners lives due to remote control).
I want to start with simple thing - by clicking on a ui-button, i should play an animation of a roadheader and a mechanized complex. Another task is to display the xyz position of mining equipment in a ui-window.
Can you share any tutorials/tips on how i can do it? Thanks in advance! And yes, i have a week before deadline, so my life in your hands…
3d-modeled mining machines, and ready-to-use animations. […] I need to set up animations inside Unreal, so that they will be played with the button clicked. I’ve already made a ui-widget, but have no idea how to make everything work properly.
On the most fundamental level:
an actor with a Skeletal Mesh Component creates a widget with a button inside
Sorry for being noob, but i don’t understand how to link everything:
I started with a basic cube, which have a bone and straight animation.
Then i created a blueprint, where i put my cube.
But here i won’t be able to get widgets and make any UI buttons for viewport.
If i go to Level Blueprint, i won’t be able to put node for any object from project
I can’t get how to make a basic ui button and connect onClick event with an animation of a test object, maybe i should start with level blueprint and somehow get a blueprint, that i already made, which contains my test cube with playable animation.
Have a look at my screenshot. Everything you ask about is already there. Do not use Level Blueprint.
• skeletal mesh component holds the asset
• widget is created and referenced
• its button talks to the actor and triggers an animation for the component
The only thing that is not working: i made a variable with Object type. In your example i can’t find which type to chose. “Add to Viewport” target is “User Widget Object Reference”, and button is “User Object Reference”. How did you connect variable to both types?
You a have type mismatch. Avoid placing down orphaned nodes, drag a wire first, then search, you’ll get matching, filtered, context sensitive results that make sense.
i made a variable with Object type
If you’re ever unsure what variable type is needed, mouse over pins - they will tell you what is needed:
And promoting with RMB, like in the vid above, saves a lot of clicks & time.