Getting movment bindings

The set up.

I’m using root motion for my character player model and I’ve already tested the input as to making the player move forwards, backwards, left and right and works fine on a scaled input between 1 and -1.

Next step is to get the projects axis binding assigned to the movement keys which seems to be different from what it takes to get a general pawn movement. (IE root motion controls speed and direction)

I tried a few different things but get strange result. Could someone be so kind and save me some time with a quick mark up as who to do this.

Not clear on what you’re asking but it’s the same. Input axis value would go into a float comparison in order to call an animation to play. The input axis value can be connected to the animrate of the animation to play to control the speed translation.

Well the movement control is in the character blueprint where I think I need to add it to the animation blueprint, which is what I’m trying to do.

Makes scene to me since the root motion should control speed and direction based on the root of the players rig in the animation BP and not on the player capsule in the character BP.

Yeah you’re right, from the character blueprint you can set a public variable for the animation you want to play or a player state if you want it controlled from a state machine. From within the animation blueprint you could use the 'event blueprint update animation ’ node and connect that to a ‘try get pawn owner’ and cast that to your character type, then pull out a reference to the variable for the player state and set that locally to allow your root motion animation to play. I have setup a struct that holds information about basic animation data, and a new class of type DataAsset to store information about the animations and how you want them to play, and associate them to an id. All the details for the animations can be connected directly to a ‘Play Slot Animation’ node in the animation blueprint. So basically, either play the root motion animation from the event graph or from the anim graph of the animation blueprint.





USTRUCT(BlueprintType)
struct FAnimationData
{
	GENERATED_USTRUCT_BODY()

	//ANIMATION DATA
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Anim", meta = (ToolTip = "ID to access resource with dynamic array"))
		int32 animID;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Anim", meta = (ToolTip = "Name of the animation to play"))
		FString animName;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Anim", meta = (ToolTip = "Animation file"))
		UAnimSequenceBase* animationFile;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Anim", meta = (ToolTip = "Slot to play the animation"))
		FName slotName;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Anim", meta = (ToolTip = "Value of blend in"))
		float blendInValue;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Anim", meta = (ToolTip = "Value of blend out"))
		float blendOutValue;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Anim", meta = (ToolTip = "Value of animation speed"))
		float playRate;
	

	FAnimationData()
	{
		animID = 0;
		animName = "";
		slotName = "UpperBody";
		playRate = 1.0f;
		blendInValue = 0.1f;
		blendOutValue = 0.22f;

	}
};

UCLASS(Blueprintable)
class  UAnimationListData : public UDataAsset
{
	GENERATED_UCLASS_BODY()
	
public:
	//Animations available in this animation set
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Combos", meta = (ToolTip = "Animations Available in this animation set"))
		TArray<FAnimationData> AnimationList;
	

	
};




-Inside animation blueprint event graph example. Use blueprint interface to connect from the character blueprint to the animation blueprint directly as a better option.
Init Player Reference

Save Player State for locomotion or attack

Play Root motion animation(red x are for non concerning nodes)

Could you make the BP available for me to download it from some place? Its rather difficult to read.

Thank you in advance. :wink:

Still having a bit of a time figuring this out. Hard to read compounded by the fact I’m a content artist trying to fake my way through.

By the way I did manage to get the animations set up in the graph and trigging using Booleans