Skip to content
Łukasz Sowa edited this page May 16, 2022 · 2 revisions

Welcome to the UDrive wiki!

Basic usage

Best way to start using UDrive is by adding the example car prefab from Packages/UDrive/Runtime/Examples to your scene.

image

You also might want to add a camera that will follow the car. You can use the included VehicleFollowCamera for that.

When you start the play mode you should be able to drive the example car, you should also see the IngameDebugger window:

image

IngameDebugger is one of the VehicleComponents attached to the ExampleCar. Other notable components include:

  • UVehicle - Core of the vehicle
  • Rigidbody - Required for physics calculations
  • UWheelColliders - Compute wheel friction forces and apply them to the vehicle's Rigidbody
  • Controllers
    • TwoWheelSteeringController - Reads VehicleInputParameter.Steer value from the UVehicle and applies the correct steering angle to the UWheelColliders
    • CarInputController - Reads player input with InputManager and writes the appropriate VehicleInputParameters to the UVehicle
    • BrakingController - Reads input from UVehicle and applies brake torque to UWheelColliders
  • Assists
    • TractionControl
    • AntiLockBrakingSystem
  • Drivetrain
    • ICEngine - Simple simulation of an internal combustion engine
    • ManualGearbox - Connects to the ICEngine and simulates a manual gearbox with clutch
    • OpenDifferential - Splits the torque from ManualGearbox between UWheelColliders

Play around with the values and see how they affect the vehicle.

Clone this wiki locally