> For the complete documentation index, see [llms.txt](https://julhiecio.gitbook.io/ju-tps-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://julhiecio.gitbook.io/ju-tps-documentation/game-development/how-to-use-vehicle-system/how-to-create-a-car-controller.md).

# How to create a Car Controller

Don't forgot to read this [guide](/ju-tps-documentation/game-development/how-to-use-vehicle-system/standard-vehicle-configuration.md) before.

1- Place car model in the scene, set layer of car to **Vehicle**(8) and Unpack Prefab

2- Add <mark style="color:green;">Colliders</mark> and <mark style="color:green;">Rigidbody</mark> (set a high value for the mass of the vehicle, like <mark style="color:red;">1000</mark>)

<div align="left"><figure><img src="https://2945806600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCQMDx0LmgnRXXTklLhoh%2Fuploads%2FSzKoq9aRJMo2EAiDetbp%2Fimage.png?alt=media&amp;token=893620f5-cfb7-443b-bdd6-6847c20077a2" alt=""><figcaption></figcaption></figure></div>

3- Create Wheel Colliders for each wheel model:

<figure><img src="https://2945806600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCQMDx0LmgnRXXTklLhoh%2Fuploads%2FLdoAieQkfS1AeWj4pdVM%2Fimage1.png?alt=media&amp;token=d5213f3e-048e-4734-b0ee-c87414f343ca" alt=""><figcaption></figcaption></figure>

4- Add **Car Controller component** and assign <mark style="color:blue;">wheel models</mark> and <mark style="color:green;">wheel colliders</mark> in same sequence:

<div align="left"><figure><img src="https://2945806600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCQMDx0LmgnRXXTklLhoh%2Fuploads%2Frm64TE68bUOWRoiYkgpV%2Fbitmap.png?alt=media&amp;token=d9e04039-53d7-4d3b-8dca-bd7603828cb8" alt=""><figcaption></figcaption></figure></div>

You can configure the vehicle axles to have different acceleration force. Of this way, you can make 4x4 traction or only front or back traction.

5- Assign Steering Wheel

The steering wheel follow the wheel collider rotation, by default the rotation is applied to Y axis.

<div align="left"><figure><img src="https://2945806600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCQMDx0LmgnRXXTklLhoh%2Fuploads%2FB4Yi6axMHWMS38IShuGP%2Fbitmap2.png?alt=media&amp;token=c83c42c4-2cad-437a-a75d-cea7a698bd22" alt=""><figcaption></figcaption></figure></div>

6- Set the center of mass

<figure><img src="https://2945806600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCQMDx0LmgnRXXTklLhoh%2Fuploads%2FLViaxyQaz8bUqVd9FLzX%2F2.png?alt=media&amp;token=b2e803c9-a956-4199-a63a-3f7030b54522" alt=""><figcaption></figcaption></figure>

7- Create a vehicle enter trigger

<div align="left"><figure><img src="https://2945806600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCQMDx0LmgnRXXTklLhoh%2Fuploads%2FskmULXRLEZyp1RI7OLvI%2Fimage.png?alt=media&amp;token=0962bfc9-db2d-4b6f-84ca-3c81e80ef4d8" alt=""><figcaption></figcaption></figure></div>

8- Create and assign **Inverse Kinematic Target Positions**

<div align="left"><figure><img src="https://2945806600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCQMDx0LmgnRXXTklLhoh%2Fuploads%2FzbEWZJpwfwgCOWAWZ5Y5%2Fimage.png?alt=media&amp;token=51221afb-fc28-4031-b20d-bc461aafe20d" alt=""><figcaption></figcaption></figure></div>

### Result:

<figure><img src="https://2945806600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCQMDx0LmgnRXXTklLhoh%2Fuploads%2FI1jXKUWZNAC6Rj8dGtMx%2FCar%20driving.gif?alt=media&amp;token=d30b7a32-2384-47e9-8d76-c3c3bac6b898" alt=""><figcaption></figcaption></figure>
