Setting up the agents
Let's create a new project called AdvancedMovement
using the Physics Ball template. Currently, we are using Unreal Engine 4.8.3. The first thing we want to do is find our PhysicsBallBP
class and open up EventGraph. We can do this by implementing the points given as follows:
After our project is loaded, navigate into the RollingBP section and then into the Blueprints folder.
In here, you'll find
PhysicsBallBP
, and this will act as our agent in this chapter. Let's open up to EventGraph for this actor.Note
We want to introduce two new vector variables to hold the current direction of the agent. The other will hold the location where the agent is spawned.
Now, let's remove any unnecessary logic from the example. I removed the following variables:
The JumpImpulse variable
The CanJump variable
All the blueprint code located in EventGraph is not in the following screenshot:
Okay, now that we have a starting ground, let's create a variable called Direction and give it the vector variable...