I have an animation sequence of 70 frame and I want to skip first thirty frame on key press and animation should play from thirty first frame.How can I achieve it through Blueprint?
First off, there’s not really the concept of frames in animation in UE4, but instead we use time.
But if you want to play an animation from 2.5 seconds in, etc, that is possible if you use an [Animation Montage]. You can choose New > Animation > Animation Montage in the Content Browser, and then in the Pick Skeleton window that appears, choose the skeleton you want to animate.
Then from the Content Browser, create an [Animation Blueprint], and set the Target Skeleton to be the same as the one you chose for the Anim Montage you created in the step above. Now go to the Animation tab and make sure you can see the Animation Montage you made previously in the Asset Browser window.
Now you can put an [Animation Sequence] into the Animation Montage. You can do this by double clicking the Animation Montage name in the Asset Browser window, and then dragging an Animation Sequence from the Asset Browser into the montage.
From here, you can play a portion of an Animation Sequence in two ways:
- Set the start time of the Animation Segment
- Define a Section in the Animation Montage
From there you can create a Blueprint based on a Character, and go to the Blueprint’s Default tab and make sure Animation Mode is set to Use Animation Blueprint, and set Anim Blueprint Class to be the Animation Blueprint you created previously.
Lastly, in the Blueprint’s Event Graph you can use a Play Anim Montage node, and here you can specify a Start Section Name if you are using method #2 above.
Hope that helps!
This is 2 years old.
Is this still the recommended way to play an animation segment or do we have a more convenient option with 4.12?
I’d like to play an animation sequence from custom start to custom end.
The Play node in your animation graph has a setting for a custom start position for a quick fix. Not for end time though, at least not in 4.12.