Adding our FPP and TPP …
Following along with this tutorial, we are going to move the FPP and TPP characters from Epics ShooterGame example to use for our project. Really the only reason is we need a character and Epic already has a full body and matching arms so we can do as need so we see first person view, and others see a full body (in multiplayer).
So we go to the file explorer and ..\Unreal Projects\ShooterGame\Content directory and copy the Animations and Characters directories, and past them into the Content folder for our project. Then we reload the project.
Once you have followed the tutorial linked above, we need to make further changes, sort of blending in the animation part from the first tutorial.
So load up HeroTPP_AnimBlueprint. Off the EventBlueprint Update Animation and Try Get Pawn Owner you want to add a Cast to Character. Add two new variables, IsFalling and IsRunning, both booleans. From that you want to add a Get Character Movement then Get Movement Mode so your Event Graph looks like this:
From the Movement Mode drag off and connect a Equal (Enum) and select Falling in the drop down box. From that Equal you want to set the IsFalling boolean.
Now you want to go back to the cast to character and drag off from the As Character pin again, this time to a Get Velocity. From that to a Vector Length, then a > (float), and there set IsRunning. This sets IsRunning to true if you are moving. Yeah, we want walk AND run, but we will have to revisit this later when we learn a bit more, for now we just need to get the basic animations running.
Now we need to go back to the Animation Graph (instead of the Event Graph). In there we had a Play Idle, we want to create a new State Machine and replace that play idle. This will let us change animations based on movement from the keyboard and mouse. So that part should look like this:
Double click on the ‘new state machine’ and it will bring up the graph for that sate machine. As a start for basics, I have idle and run set up.
Double click on Idle or Run (you need to make these and name them), and you will need to add Play Idle and connect to final animation pose (and do the same for Run with the proper running animation).
The translation rule from idle to run should get IsRunning and connect to Result, and from run to idle should get IsRunning and send it through a NOT then to Result.
That get’s us the TPP character doing idle and running, and our FPP arms out in front of us. We need to add jumping, crouch and walk (as default movement should be walk, then shift W for run)… so more a bit later.
Here is what we have so far:






