Movement and playing animation
Hello. I am working at movement animations. I have Bind Axis (which means the function is called in every frame). If Value = 0 then there is no movement, if 1 or -1 then character is moving. But the animations are played non-stop.
I need check what animation is already playing or something like this, but idk how. Now the animations is overlap and this is not working correctly.
UCharacterMovementComponent* CharacterMovement = GetCharacterMovement();
CharacterMovement IsWalking() is always true...
I will be grateful for your help
Hey, why you make your life so hard with this code? :)
Use Animation blueprint, this is exactly why epic did Animation Blueprint! Animation blueprint is a state machine animation system which works with different states and you dont need handle blends or anything else between animations, you need only do the logic what and where can blend!!!
From other side, your code is totally wrong.. because you looped the animations and play simple anim asset should be not override each others...
If you really wanna handle animation playing from code instead of Animation Blueprint (REALLY REALLY NOT SUGGESTED) you should play anim montages instead of anim assets..
you can read about animmontage here: https://docs.unrealengine.com/latest/INT/Engine/Animation/AnimMontage/
hope this helps. cheers
answered Mar 01 '18 at 08:54 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here