We use the VehicleComponent from Epics by default for our vehicles.
It lets to configure a car, as you want. Let’s take a look on some settings from of this component.
Wheels
We use a skeletal mesh for our vehicles. This is neccessery for wheeled vehicle, so if you will want to change the mesh, then you will need to create your own skeletal mesh, but you should remember that bones for wheels MUST have the same name as you can see on the screenshot. It is the most IMPORTANT part of the documentation, because if bones will have different names, then nothing will work.
Customizable wheel components
It is not a bug secret, that different cars have different abilities to overcome terrain. In this project, you are also able to setup these characteristics. To do that lets find our wheels blueprints. Go to Cars\Blueprints\Wheels and find four blueprints.
These classes were created to fine tune each wheel. This is where you set parameters such as wheel size, offset, weight, width, and so on. Pay attention to the "Affected by handbrake" parameter. This is a very important setting because if you set it to false for each wheel, then you will not be able to stop the car.
Setting the steering angle, at what angle you can turn the wheel when turning. You should remember, that the rear wheels are not able to turn, but the front are.
To apply the changes, open the car blueprint, click the VehicleMovement component and add the created BP_Wheel classes to it in the following lines. Remember about that the classes for the front and rear wheels must be different.
Mechanical Setup
Here you can customize the transmission. Cars of this project have an automatic transmission, so there is no need to change gears. You just need to adjust the number of them and the time to switch them. You can also adjust the engine power.