Download

Animation access: Pause, Reverse and other things

I have a metal rollup warehouse door SkelMesh asset that has simple up and down animations. They were created with a IK setup in Max to make the door actually roll up so its not something that can be recreated in engine.

My issue is I need some way to manipulate those animations during play. For instance, the door is closing and a player stops it mid way… This is doable now with a Stop node. But I then need a way to start it up again from that same spot. Is there a way to figure out what frame it is currently on then a way to tell it what from to start from?

This can all be done rather easily with a matinee, but I want to keep this self contained in the actual Blueprint and not rely on something map specific.

Any thoughts?

I’d glance into Timelines…might be able to use the same logic as Matinee in your Blueprint with them but I’ve no real idea…just an idea until someone much cooler comes along and likely solves this…

a timeline example here - http://youtu.be/6rTx2MH-7qA
Documentation here - Timelines | Unreal Engine Documentation

Yeah, I am aware of timelines, but that won’t work for this type of door. It’s not a swinging/sliding style but is segmented and has 30 bones that roll it up into itself. So it needs to be driven by an animation and not procedurally.

Unless I’m missing something in how a timeline can drive an animation on a SkeletalMesh?

You could have a look at making a montage from the open animation. Then you just hit Montage Play and use the Play Rate nodes to adjust it (i.e. 1 closes, -1 opens, 0 pauses).

Hadn’t thought of a Montage… will see whats possible. Thanks.

Any luck yet? I am working on a similar garage door system. The door has about a 10 second animation from closed to fully opened. I can get the door to go up by using play animation but when I try to reverse the animation the door slams back to the start position. I have tried to do it in Montage but once the Montage starts sending the door up it won’t stop until it has completed the animation.

All the tutorials on Animation or Animation Montage seem to be how to add quick character animations like Punch or Crouch that don’t need to be stopped midway through or reversed.

What have you

No. Pretty much ran into the same issues as you. It can work with a Matinee pretty well, but I was looking for a way to do it as a self contained Blueprint without a direct link to the level.

O.K! Got it! Exhausting! You need to set up an Anim Blueprint

Create an Anim Blueprint by right clicking the skeletal mesh from your animation, choose Create, then Anim Blueprint
Double click to open the Anim Blueprint you just created. In the upper right hand corner choose the Animation you want to use for this Anim Blueprint.
Next, click on “Graph” (next to Animation in upper right) and choose the “Anim Graph” tab in the middle window. You should see a box that says “Final Animation Pose”
Right click nearby the “Final Animation Box” and type play in the search field. You should get “Play (your animation name here)” select it.
Go to the settings for this play node and uncheck “Loop Animation” and put a check next to “(as Pin) Play Rate” this will provide a pin to connect a play speed variable
Below the main window select the “My Blueprint” tab click +V to add a variable. In the variable settings name the variable DoorSpeed and set the variable type to float
Compile the Blueprint. Scroll down to the bottom of the variable settings and set the default value to 0
Drag the variable up to the main window select “Get” then connect it to the “Play Rate” input. Connect the Play animation node to the Final Animation Pose.
Compile and Save.

Next… Setting up another Blueprint that uses this Anim Blueprint.

Alright… Part 2
Create a new Blueprint (just a regular Blueprint)
Make sure you have selected “Components” in the upper right hand side for the screen. Drag the Skeletal Mesh from your animation into the “Components” panel. In the Details panel scroll down until you see “Animation” for the “Anim Blueprint Generated” choose the Anim Blueprint you created earlier.
Select “Graph” in the upper right hand corner. Then make sure the “Event Graph” tab is selected in the main window
For demonstration purposes I am going to use a simple “Event Begin Play” to fire our Blueprint you can set up action mapping or triggers for your own project later.
Right click in the main window drop down Add Event and choose “Event Begin Play”
Pull an line up from the “Event Begin Play” node you created. In the search field type "cast to (you should see the name of your Anim Blueprint) select it
From the My Blueprint tab on the left drag the reference to the skeletal mesh into the main window and select “Get”
Pull a line from this skeletal mesh reference and get a “Get Anim Instance” node. Pull a line from “Return Value” output to the “Object” input of the Cast to (your Anim Blueprint) node.
Pull out a line from the bottom button “As (your Anim Blueprint)” connector. In the search field type “set door speed” create that node and enter 1 for the speed. Connect the output of the cast to (your Anim Bluerpint) node to the input pin on the “Set” node. Pull out a line from the “Set” node and create a delay node. Set the delay for something like 5 seconds. Out of the “Delay” node create another “Set” door speed node. Set the speed to 0. Create another “Delay” node for a couple of seconds then another “Set” door speed node. Set it to -1.

Compile and Save. Drop this Blueprint into the world and click Play. The door should start opening for 5 seconds. Pause for a few seconds, then close.

Sorry, was away for weekend… just tried this and it works like a charm! Exactly what I was trying to do. :slight_smile:

Thanks a ton!

I need to do this as well, very instructive!