Layer Setup
Last updated
Last updated
To work correctly, AVC requires a ground layer to be set and used – this stops the ground check raycast from hitting the vehicle collider and causing issues with the movement. You can use multiple layers (eg: ground, road, sand, water, gravel, grass, etc)
After importing AVC, you should be greeted with the layer setup window:
If that window doesn’t automatically appear, select Tools -> e23 -> ‘AVC Setup’. Clicking the ‘Add Layer’ button will automatically add ‘Ground’ into ‘User Layer 9’ (found in Edit -> Project Settings -> Tags and Layers). If layer 9 is not blank, then the setup will not continue, and you will be given an error. It's important to check this layer is set as the 'Ground Mask' correctly on any Vehicle Settings you use with your vehicle, as well as for any meshes you wish to be drivable (select the road/ ground GameObject -> use the 'Layer' drop down at the top to select your ground layer).
1- Open the Tags and Layers window (Edit -> Project Settings -> Tags and Layers).
2- Find an empty user layer.
3- Enter ‘Ground’.
4- Go to \Assets\e23\ArcadeVehicleController\Examples\VehicleSettings
5- For each settings asset set the ‘Ground Mask’ as the layer you created in step 3.
6- Load the demo scene.
7- Select the game object ‘Tracks’.
8- Set the layer as the layer you created in step 3, and yes to change all children.
There's an additional layer setup required if you're using the box collider. Add two new layers called 'CarMovement' and 'CarCollision' (though, you can name them as you please).
Then in Project Settings -> Physics, change the collision matrix to untick these two new layers from interacting with each other.