Scripting movement behaviors
Before we can have our vehicle move through various player controls, we need to script the blueprint behaviors in BP_NewVehicle Event Graph by taking advantage of the VehicleMovement (Inherited) Component variable. To start with, let's navigate to Content Browser and to our VehicleContent folder so that we can double-click and open BP_NewVehicle.
In an empty area of Event Graph, let's right-click and use the context-sensitive drop-down menu to search for our Input Axis MoveForward event node so that we can control the forward and backward throttle of our vehicle. Next, we need to grab a Get variable of the VehicleMovement (Inherited) component. To do this, we have to hold down the CTRL key and then click and drag the ...
Get Unreal Engine Physics Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.