Simple car controller for Unity requiring only a body with four wheels.
Features:
- Touchscreen and keyboard support
- Automatically find wheels
- Camera follow
- Adjustable skidmarks
- Engine backfire
- Breaklights
- Updates wheel positions based on steering angle
Setup:
- Create or download a car body with four wheels and wheelcolliders
- Name each wheel WheelFrontLeft, WheelFrontRight, WheelRearLeft, WheelRearRight
- Select two materials for active and disabled breaklight
- Attach breaklight element to script in editor.
- Label game camera as "Main Camera"
- Uncomment touchscreen controls or keyboard controls
- Attach this script