Description

This may not be an expected use of state machines, but it is becoming a showstopper for a couple of users.

These user's are caching their locomotion state machine and then using a second state machine to switch weapons, which calls on that cached locomotion pose.

Every time the locomotion cache is referenced, the locomotion state re-initializes itself from the entry node.

One user set up a test case for us. See repro steps

https://answers.unrealengine.com/questions/215497/possible-bug-in-using-two-anim-state-machines.html
https://forums.unrealengine.com/showthread.php?67503-How-to-connect-two-state-machines

One user also investigated the code a bit.

I debugged the code a bit, and what I discovered is that every time the upper body changes state the following function is called for the Locomotion state machine which basically resets the whole state machine.

    USTRUCT()
    struct ENGINE_API FAnimNode_StateMachine : public FAnimNode_Base
    {
    	......
    	
    	// FAnimNode_Base interface
    	virtual void Initialize(const FAnimationInitializeContext& Context) override;
    	
    	......
    };
Steps to Reproduce

1. Download the attached files
2. Create a Third Person Blueprint Template project
3. Inside the zip file, copy the content folder
4. Paste it into the Third Person project directory and overwrite the existing files
5. Launch the project
6. PIE
7. Hit the F key

Result: The F key switches between two identical states in the "Test" state machine. These states simply plug the cached locomotion state machine into the Final Pose. Every time the "Test" state machine switches states, the Locomotion state machine is re-initialized. Locomotion state machine has a jump anim at the start to make it more apparent.

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Cannot Reproduce
ComponentOLD - Anim
Affects Versions4.8
Target Fix4.12
CreatedMay 19, 2015
ResolvedApr 14, 2016
UpdatedMay 18, 2020