Preparing Your Vehicle
Last updated
Last updated
AVC requires that your model be setup in a certain way, so that various parts of the vehicle rotate correctly - for example: wheels rotate around the center and the front wheels turn on Y correctly.
1- For the vehicle to work correctly, the hierarchy needs to be setup in a certain way. Below is an image of how the included demo vehicle model imported, this won’t work.
2- Compare that with the hierarchy for the prefab.
Model holds everything, and should be at position 0,0,0.
Body has all the body parts underneath it, and should be at 0,0,0.
Parts is optional, required for this model because the body faces in the wrong direction. This GameObject is rotated 180 on Y.
The two front tires require an empty GameObject (FrontParent) to deal with their turning rotation. Due to the pivot point on these wheels, they also require an additional empty GameObject (tireFront) to get the pivot to be at 0,0,0 for the correct rotation.
Parenting the front wheels: 3- Create an empty GameObject.
4- Copy the position of your front left wheel.
5- Select the empty GameObject and paste the position from the front left wheel.
6- Draw the front left wheel to be a child of the empty GameObject and rename to “FrontLeftParent”.
7- Repeat for the front right wheel.
8- (Optional) The same process can also be used for the rear wheels, especially if the pivot for those wheels is not at the center of the wheel geometry.