4 - Creating a Vehicle Blueprint

In this step, we'll create the Vehicle Blueprint where we create and setup a functional vehicle.

Windows
MacOS
Linux

By now, you've created a few different assets (TireConfig Data Assets, Wheel Blueprints, and an Animation Blueprint), which you need to bring together to create a fully functional vehicle in Unreal Engine 4 (UE4). In this step, you'll create the Vehicle Blueprint, using those assets that were previously created and set up.

Creating and Editing the Vehicle Blueprint

  1. In the Content Browser, click the Add New button, then select Blueprint Class from the menu.

  2. In the Pick Parent Class window, under All Classes, search for "wheel" and then select WheeledVehicle.

  3. In your Content Browser, the new Blueprint asset will be created. Make sure to give it a recognizable name so that you can easily locate it later.

    newVehicle.png

  4. From the Content Browser, select and open your newly created Vehicle Blueprint.

    MyVehicleBP.png

  5. Click on the Skeletal Mesh Component named Mesh from the Components Window. Then, in its Details panel, set the Skeletal Mesh selection box to your vehicle's own Skeletal Mesh asset.

    ComponentsWindow.png

  6. Set the Anim Blueprint Generated Class to your vehicle's Animation Blueprint that we created in Step 2 of this guide.

    AnimBPandSkelMesh.png

  7. Go back to the Components window and select the Add Component button and select a Camera Component

    addCamera.png

  8. Use the Viewport in the Blueprint Editor to position the Camera where you would like it to be relative to your vehicle. In the image below, it is positioned behind, slightly raised, and tilted down towards the vehicle.

    cameraPlacement.png

  9. With the Camera component still selected (in the Details panel under Camera Settings), disable the option for Use Pawn Control Rotation. This will lock the camera to its view direction (rather than that of the Player Controller).

    cameraControllerOff.png

  10. Next, select the Vehicle Movement Component in the Components window.

    ComponentsWindow2.png

    In the Details panel under the Vehicle Setup section, expand the arrow next to Wheel Setups and for each wheel (0-3) set the following:

    • Set the Wheel Class to the Wheel Blueprint(s) you created.

    • Set the Bone Name to the name of the joint that should be controlled by the wheel.

      wheelsSetup.png

      The Bone Name in the above image is specific to this skeletal mesh. If you're using the Vehicle from Vehicle Game, you can use these Bone Names.

    The order you assign wheels has no bearing on if it is a front or a rear wheel, only the Bone Name and Wheel Class have any effect. For organizational purposes, it's best to keep the wheels (front and rear) together.

    If you need more than 4 wheels, you can click the "+" icon next to the Wheel Setups property to add more.

End Result

At this point, assuming your vehicle is not substantially larger than a minivan, the default values will be a good starting point for you to move on to the next step in this guide, where you'll setup the inputs and controls to properly test the vehicle.

Tags
Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback