Skip to content

Car Controller Public Variables

Coder-Boiiiiiii edited this page Oct 24, 2021 · 8 revisions

Car Controller Variables

Wheel Colliders

FL - Front Left Wheel Collider of car.

FR - Front Right Wheel Collider of car.

BL - Back Left Wheel Collider of car.

BR - Back Right Wheel Collider of car.

Wheel Transforms

Fl - Front Left Wheel Transform of car.

Fr - Front Right Wheel Transform of car.

Bl - Back Left Wheel Transform of car.

Br - Back Right Wheel Transform of car.

Wheel Transforms Rotations

FL_Rotation - Rotation of the Front Left wheel transform (if it is rotated, then set the vector 3 to the rotation value, if not then leave it as is)

FR_Rotation - Rotation of the Front Right wheel transform (if it is rotated, then set the vector 3 to the rotation value, if not then leave it as is)

BL_Rotation - Rotation of the Back (or Rear) Left wheel transform (if it is rotated, then set the vector 3 to the rotation value, if not then leave it as is)

BR_Rotation - Rotation of the Back (or Rear) Right wheel transform (if it is rotated, then set the vector 3 to the rotation value, if not then leave it as is)

Car Settings

Motor_Torque - Torque of the engine (700 or 900 is recommended value)

Max_Steer_Angle - Maximum Steer Angle for the car (A value between 25 and 35 is recommended)

BrakeForce - Counterforce that the brake should apply (Something like 500 to 1000 would be recommended)

Maximum_Speed - Set this to the maximum speed of the car.

handBrakeFrictionMultiplier - Hand brake friction multiplier, the more it is, the harder it would be to drift ig (Not sure about this as I used a youtube video to do it, check the links in the References to see the video)

handBrakeFriction - Hand Brake Friction (Not sure about this as I used a youtube video to do it, check the links in the References to see the video)

tempo - Don't do anything to this value, if you do, it won't change anything (leave it as 0).

Boost Settings

Boost_Motor_Torque - The Motor torque when boost is enabled.

Motor_Torque_Normal - The Original motor torque (Set it to the number of the motor torque)

Audio Settings

Engine_Sound - Set this to the audio source with the engine track.

Max_Engine_Audio_Pitch - Set this to the maximum pitch of the audio source

Min_Engine_Audio_Pitch - Set this to the minimum pitch of the audio source

Min_Volume - Set this to the minimum volume of the audio source.

Max_Volume - Set this to the maximum volume of the audio source.

Drift Settings

Set_Drift_Settings_Automatically - set this to true if you want the drift setting to be set automatically, set to false if not.

Forward_Extremium_Value_When_Drifting - Set this to the forwards extremum value when drifting (if Set_Drift_Settings_Automatically is false)

Sideways_Extremium_Value_When_Drifting - Set this to the sideways extremum value when drifting (if Set_Drift_Settings_Automatically is false)

Light Setting(s)

Lights Settings (With Light Objects)

Enable_Headlights - Enable if you want headlights, disable if not.

Enable_Brakelights - Enable if you want brake lights, disable if not.

Enable_Reverselights - Enable if you want reverse lights, disable if not.

HeadLights - attach the headlight game objects to this.

BrakeLights - attach the brake light game objects to this.

ReverseLights - attach the reverse light game objects to this.

Light Settings (With MeshRenderers)

Enable_Headlights_MeshRenderers - Enable if you want headlights, disable if not.

Enable_Brakelights_MeshRenderers - Enable if you want brake lights, disable if not.

Enable_Reverselights_MeshRenderers- Enable if you want reverse lights, disable if not.

HeadLights_MeshRenderers - attach the headlight game objects to this.

BrakeLights_MeshRenderers - attach the brake light game objects to this.

ReverseLights_MeshRenderers - attach the reverse light game objects to this.

Particle System(s) Settings

Use_Particle_Systems - Set this to true if you want to use the particle systems.

Car_Smoke_From_Silencer - set the amount to the number of silencers the car has, the particle systems will be the output smoke.

Other Settings

Center_of_Mass - The center of mass so the car doesn't flip or topple when it turns too hard (Set it to the mid-lower part of the car).

frictionMultiplier - The friction multiplier (Not sure about this as I used a youtube video to do it, check the links in the References to see the video)

Car_Rigidbody - Set this to the car's rigid body.

Debug

You do not need to do anything with these values as they are read-only.

References

Links to the videos I have seen to make the Controller

Make Drift Controller Unity (By Pablo) - https://www.youtube.com/watch?v=fy6QgoI4Jh0&t=10s

Low Poly Racing - Making Of - Episode 3 - Unity & Blender (By Imphenzia) - https://www.youtube.com/watch?v=MkOGlTTvaWU