Unity3D Car Tutorial

Dear Unity3D developers,
Unity3D is published a car tutorial in their official page.
Here, I will make some changes on scripts to make this game more fun.

This post will be updated when any new idea comes up, please follow Farkow.com on Twitter or Facebook.

First, here some screenshots from the tutorial.

Wathc the changes video here;

You can play the latest web version as high quality or medium quality or low quality.
PLEASE MAKE SURE YOUR RAM AND VIDEO CARD IS POWERFUL ENOUGH !
If you have advices, please write it as comment please.

Download versions as high quality for Windows, Mac (Universal), Mac (PPC), Mac (Intel).



Update Log…

  • Update 2 (May 02, 2010)
    • SkidSmoke’s particle animator’s colors are updated.
    • SkidSmoke’s particle animator’s force values are updated.
    • SkidSmoke’s particle animator’s growing size is increased.
    • SkidSmoke’s ellipsoid particle emitter’s max energy is increased to 7.
    • Wheel size is changed.
    • Wheel steering graphics are changed.
    • Turning speed is updated.
    • Skidmark’s touchiness is decreased.
  • Update 1 (April 25, 2010)
    • Turn values for car is changed
    • SkidSmoke’s size, energy and colors are changed.
    • Main Camera’s height is increased.

  • Car is turning a lot, so we may reduce turn values.
    Change “maximumTurn” and “minimumTurn” values >>> 15 to 10, 10 to 4
    After that we must care on speed for turning values.

    Car.js

    Line 26:
    var maximumTurn : int = 10;
    var minimumTurn : int = 4;

    Line 583:
    Divide “topSpeed” with 6.4 to decrease turn range.
    if(speed > topSpeed / 6.4)

    Line 586:
    Divide “topSpeed” with 5 to decrease turn range on high speed.
    var speedIndex : float = 1 - (speed / (topSpeed / 5));

  • Smoke is so dark and small. We may do some changes to make it like steam. SkidSmokeEllipsoid Particle Emitter
    Min Size: 1
    Max Size: 5
    Min Energy: 3
    Max Energy: 6
    Min Emission: 100
    Max Emission: 150
  • Particle Animator
    Color Animation[0] : RGBA 237,237,237,10
    Color Animation[1] : RGBA 212,212,212,109
    Color Animation[2] : RGBA 151,151,151,88
    Color Animation[3] : RGBA 218,218,218,33
    Color Animation[4] : RGBA 226,226,226,0
    Size Grow: 2
    Force X-Y-Z: 0.1

    Particle Renderer
    Length Scale: 2
    Max Particle Size: 0.25

  • For a better vision, change “Main_Camera”‘s height to “2″ in “Car Camera” object.
  • A race is need bigger tires. Scale (X) all wheel sizes to 1.4, change all wheel position (X) to 0.05
  • Wheels’ steering graphic for left & right is not enough for a car, so we may update it.

    Car.js

    (Line 397) Multiply maximumTurn with 2.2 => ea.y = steer * maximumTurn * 2.2;

    It will not change the maximum turn value of the car but graphics.

  • There is a lot smoke on tires so we may reduce for lower speeds.Car.jsLine: 338
    Decrease 23 instead of 15.
    var skidGroundSpeed = Mathf.Abs(w.groundSpeed.x) - 23;

Download the script updates here;
car.js

Share
Comments are closed.