Trailer Setup

Learn how to setup a trailer

1. Add necessary components

A trailer is simulated with a TrailerController component. Simply add this component to the ROOT game object of the trailer.

Two other required components will be added automatically: TrailerVisualsEssentials and TrailerConnector. (as well as a Rigidbody and a Joint). The references should be automatically injected as well.

TrailerVisualsEssentials functions similarly to CarVisualsEssentials.

TrailerConnector is an essential component for actually connecting a trailer to the truck.

2. Create vehicle axles

Similarly to CustomVehicleController, TrailerController uses VehicleAxle array. The only difference is that it does not differentiate between front and rear axles.

To add new axles, open a "VehicleAxleWindow".

An editor window should open. Next, make sure the trailer controller game object is selected.

The window will bind to it.

You can lock the window in the bottom left to stop rebinding the window after selecting/deselecting game objects.

Click on "Add" to add as many possible axles as you want.

Drag and drop the wheel references into their respective fields in the editor window

Next, click on the "Add Axles" button.

The trailer controller is initialized now.

3. Assign parts to the trailer

Similarly to the CustomVehicleController, a TrailerController can use a customizable set of parts or a parts preset. The difference is that a trailer only uses "chasis" parts like body, wheels, suspension and brakes.

Set "UsePreset" to True and select a preset from the object find window.

Next, adjust the TrailerConnector

TrailerConnector

4. Creating/modifying/changing parts and presets.

Similarly to CustomVehicleControler, TrailerController has its own editor window where you can create/change/modify parts and presets.

The workflow is absolutely the same to the editor for CustomVehicleController.

Creating New PartsModifying Parts

Last updated