How to transition from 1 anim state to another using a montage

I am trying to get a character to fall down using a montage in a networked game.

The reason why it needs to be a montage is that the animation has root motion applied, and root motion in networked games must be applied through a montage (according to the docs and the tooltip when hovering over “Root Motion from Everything” in the anim BP settings).

So, I have a falling down montage, and I am looking to transition from a standing state to a “lying on ground” state by using the falling down montage in between. I had this working before as a “Idle->FallDown->LieOnGround” state machine but needing to use a montage messed it up.

The video below shows a setup where, when the character needs to fall down, it sets an “bIsFalling” bool to true, plays the falling down montage, and on completion or interruption then sets bIsFalling to false. In the anim BP, the character will transition to the “LieOnGround” state if they die and bIsFalling is false. The problem with this is that the state machine pauses when the montage is playing, so there is a frame where they are still standing before falling to the ground. This is with all blend settings set to 0 (0 between standing to lying states and 0 blend out time on the montage).

If I remove the bIsFalling condition, the opposite problem happens where they are on the ground for a frame before playing the montage.

I am thinking montages are the way to go but if you have some other way to achieve what I want I am willing to try it.

Thanks!

Still looking for a potential fix… :pensive:

Could you trigger the change with an anim notify near the end of the montage? That way the montage could dictate the change while playing.

Thank you!! That worked!

I, for some reason, thought the anim graph was paused when a montage was playing but that doesn’t seem to be the case here. Using an anim notify or setting the value when the montage is blending out solved the issue.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.