For the tutorial on how to use your own car in the car system click the link Below:
Posable Car System - Custom Car Model Tutorial
Use the Table of Contents below to jump to specific sections
This page will detail various modifications that can be done to the posable car system. I have not done all of these modifications myself, but I’ve thought out how they may work and will provide some guidance on how I’d handle them.
For audio on Door open I’d use two contacts, one parented to the door, and one parented to the body of the car. They need to be positioned such that the door contact is inside/contacting the body contact when the the door is closed. The door open audio should be triggered when the door contact leaves the body contact
For Door Close you could have it be the inverse of the open logic above. But personally I’d add a second contact reciever in the same place as whichever contact you have as a reciever in the above case but instead of the reciever type being set to constant have it set to on_enter with a small but still decently fast min velocity so that you need to close the door kinda fast for it to play the sound.
This one I’d set up a Driver physbone that isn’t physically attached to anything on the car but instead sends a parameter to the Car System Animator which drives an animation. In this case, we’ll have an animation of the Sliding Door where the start is with the door closed, and the end is the door opened.
For the Physbone, we place the physbone’s Root at where the handle of the door will be when the door is fully open, and child gameobject that forms the tail of the physbone at the position of where the handle of the sliding door is when the door is closed. Use one of the Door Physbone components that are on the example Car Systems as a base for the Pyhsbone here but set the Max Angle to 0 and the Max Squish to 1. What this’ll do is create a physbone that we can only grab and move in the direction the door needs to go in to open it by ‘squishing’ the physbone. Make sure to give the bone a Parameter name so we can access it in the animator
In the Animator you’ll need to have a state that uses the physbone’s squish parameter that was just set up to drive the animation which was mentioned in the first paragraph. I personally do this in a blend tree but you can do the same thing in a state with motion time affected by the squish parameter.
Due to the instantaneous nature of direct blend trees you won’t easily be able to have an animation for pop-up headlights popping up and down just by adding them to the animations currently in the blend tree. My recommendation is to create an additional layer that handles just the pop-up lights the traditional way with multiple animation states and transitions.
Not all vehicles have 4 wheels. If you have a vehicle that has more than 4 wheels you’ll need to make some small modifications to the system.
First step is to Duplicate some of the WheelRay game objects under the WheelRaycast object until you have enough raycasts for all of your wheels.
Then just set up all the wheels the same way you would for Unity Steps 4 and 5 in the Custom Vehicle Tutorial.