Language:
Page Info
Tags:
Skill Level:
Engine Version:
Share
此中文页面内容对应的英文页面有后续更新,如需浏览最新文档可切换至英文页面浏览。

1 - Create a TireConfig Data Asset and Wheel Blueprint

In this first step to creating our own vehicle, we have two parts that go together to make up the wheels for our vehicle; the TireConfig Data Asset and the Wheel Blueprint class. We'll start by first creating the TireConfig Data Asset and then move on to create the Wheel Blueprint that houses a bunch of properties for our wheels and where the TireConfig data is assigned to.

Follow along with the steps below to get started creating your TireConfig data and then using that with a Wheel Blueprint.

Tire Config Data Asset

The TireConfig Data Asset is used to control Friction Scale. This value not only affects the raw friction of the wheel but also scales the values for how difficult (or easy) it is for the wheel to slide while in a hard turn. There is also the additional option of Tire Friction Scales which enables you to specify a specific Friction Scale to different Physical Material types.

tires02.png

Create your TireConfig Data Asset

  1. In the Content Browser click the Add New Button, then hover over Miscellaneous and then select Data Asset from the Context Menu.

  2. In the Pick Data Asset Class window, select TireConfg to create this type of Data Asset.

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

newDataAsset.png

In the Pick Data Asset Class window, you may notice that there is also a TireType Data Asset class. This is a deprecated function and is only used when upgrading older projects to 4.15 or a later version. You should not have any reason to use this data asset type if using Unreal Engine 4.15 or later.

Wheel Blueprints

In most cases, you will have at least two wheel types; a wheel that is affected by steering and one that is not. Also, this may be the case for having differently sized wheels for the front or the back, in which case you have full control over setting the differing radii, mass, width, handbrake effect, suspension, and many other properties to give your vehicle the handling you desire.

Click the image for full size view.

Create your Wheel 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 VehicleWheel.

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

  4. Optional - Repeat these steps again so that you have a front and rear wheel type.

newWheels.png

Editing the Wheel Blueprint

Now that you've got your Wheel Blueprint(s), open them in the Blueprint Editor, and you'll see all the available options to edito your wheels!

There are five properties that we need to initially change for each wheel, as the rest of them will change how the vehicle performs and should be tweaked later as you start to test out your vehicle in your own game.

  • Shape Radius

  • Shape Width

  • Affected by Handbrake (usually restricted to the rear wheels)

  • Steer Angle (usually only the front wheels)

wheelProps.png

The properties here are set to match the Buggy from Vehicle Game. If you're using your own Skeletal Mesh you may need to use different values for the Shape Radius and Shape Width.

Now, under the Tire section, you can assign the Tire Config Data Asset that you initially created using the Tire Config selection box.

TireConfig.png

End Result

At this point, you've set up your Tire Config Data Asset that is used to control how much the tires slide on any surface and setup the Wheel Blueprint that can be used to specify all the different properties of your wheel. In the next step, we'll continue creating the assets we need that make up our vehicle by creating the Animation Blueprint that handles all the necessary animation information for our vehicle, like spinning tires, steering, suspension, etc.

Tags