Racing Car Game # Day 5— Wheel Smoke Effect

Objective: Add wheel smoke effect when skidding

Jean-Noel Seneque
3 min readNov 21, 2021

In the previous article, Racing Car Game # Day 4 — Braking & Skidding, we added Braking, skid marks, and skid sound effects. In this article, we will enhance it with a wheel smoking effect.

First, we need to add a Particle System and name it WheelSmoke.

Change following settings

In the Transform, rotate the X: to -180

On the Particle System:

  • Start Lifetime Random BetweenTwo Constants 2 and 7
  • Start Speed Random BetweenTwo Constants 2 and 4
  • Start Size Random Between Two Constants 2 and 3
  • Gravity Modifier -0.02
  • Simulation Space World
  • Max Particles 500

Emission

  • Rate over Time 20

Shape

  • Shape Cone
  • Angle 5
  • Radius 0.1

Color over Lifetime

I made the left side a little grey, full Alpha and right side white but alpha set zero so the particle fades away

Size over Lifetime

I change the curve to smooth out and increase the size from 1 to 5

Make it a prefab and remove it from the Hierarchy. Let’s open the Locomotion script to create the smoke on the tyres when skidding.

First, add a variable to store the prefab at the top.

We need an array to hold a particle system for each wheel.

In the Awake method, we want to create and have the wheel smoke ready

In the CheckSkid method, add the following to the bottom of the if statement

Save the script, back in the Editor, select the car and drag on the WheelSmoke prefab to the Locomotion slot.

Press play and enjoy the effect. Go ahead and play around with settings to get the right look of smoke.

In the next article, we are going to migrate to the next input system so we can play the game on either a keyboard, gamepad, or touch screen.

If you enjoyed reading this article give me a Clap, also if you would like to see more, “Follow” me, so you may be notified of future releases. You may also send me a message if you need any help or if there is something you think I can improve.

--

--

Jean-Noel Seneque

A Data & Analytics Consultant who is expanding into developing experiences in XR, Enterprise and Gaming space using Unity www.jeannoelseneque.com