Where do you assign a animation to a mapped button input?
Hey guys! So I have mapped all my button and key inputs and was looking to assign a animation to be trigger to each. I have yet to find this looking through all the example files. In the sidescroller template press spacebar/gamepad A button will start the sequence that is in the animation graph. if i wanted to assign a specific animation to be triggered by a different input how would I go about that?
There's probably a couple ways to set up what you are trying to do. The first is using states in the Animation Blueprint that can be entered when a specific input is pressed. In the side scroller template, in the AnimGraph, the JumpStart state will be entered (playing the anim inside) whenever the bool 'IsInAir?' is True. Similarly, you could set up any number of states and animations that you could fire using variables like 'ShouldPunch?' or 'IsInWater?' or whatever in their transitions. For instructions on how to pass those variables to your Animation Blueprint, take a look at this question: LINK.
Second, you could use Animation Montages to play whichever animation that you want for a specific key press. A Montage will play on a Slot node in your AnimGraph without having to have an individual state for each mapped animation. Detailed documentation on montages and how they work here: LINK.
There are situations when it makes more sense to set things up the first way and others where the second way is probably better.
answered Apr 20 '14 at 02:29 AM
Ray Arnett STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here