# Setup a Vehicle from Scratch

## 1. Scene Setup

1. Create a new scene and open it
2. Create a new 3D Object -> Plane and set the following values

![Plane values](/files/-MRKQ7VmHQLEqASjBCGE)

{% hint style="info" %}
If no Ground Layer exists in your project, create it
{% endhint %}

## 2. Vehicle Setup

Create a new **Game Object** and add a **Vehicle** component. Set the Ground Layers to **"Ground"**

![](/files/-MRKRpnKH7meV0QBqMZ2)

4\. Drag and drop the car model from **Assets/Ilumisoft/Arcade Racing Kit/Example/Models/Kenney Racing Kit/Racing Car** onto the vehicle

5\. Select the four wheels, add a **sphere collider** to them and set the **Physics Material** to **Wheels**

![Wheel setup](/files/-MRKTK9sZjFduLX7wZZe)

{% hint style="warning" %}
Setting the **Wheels** physics material is very important, otherwise the vehicle will not be able to move
{% endhint %}

## 3. Camera Setup

1. Create a new **Game Object**, name it **Vehicle Camera** and attach it to the vehicle
2. Add a **Vehicle Camera** component to the Game Object
3. Select **Cinemachine->Create Virtual Camera** and attach it to the **Vehicle Camera** Game Object
4. In the **Vehicle Camera** component, set the **VmCam** field to the created virtual camera
5. &#x20;Set the virtual camera inspector fields to the values in **image 3.5**&#x20;

![3.4 Vehicle Camera](/files/-MRKVZnPVgUhQ6TQUE6O)

![3.5 Virtual Camera Setup](/files/-MRKWfWsFUC3fkiAtreD)

{% hint style="info" %}
If the Virtual Camera is not positioned behind the vehicle after setting up the values, disable the game object, reset the transform, and then reenable the game object
{% endhint %}

{% hint style="success" %}
Congratulations! You have created a basic vehicle from scratch. When entering playmode, the vehicle should be able to drive properly and the camera should be following up.
{% endhint %}

## 4. Extend the Vehicle

We created all vehicle scripts to work in a very modular way. With the basic setup, you can extend the vehicle further by adding a custom center of mass, effects, audio and UI. To see a complete example, take a look at the [example scene](/arcade-racing-kit/get-started/run-the-demo-scene.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ilumisoft.gitbook.io/arcade-racing-kit/how-to/setup-a-vehicle-from-scratch.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
