Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Creating a driveable vehicle in Unity 3D

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
3,229
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Oct 14, 2011

This is a tutorial where I demonstrate how to create a simple car in Maya and export it via FBX to the Unity game engine. Once inside of the Unity game engine I show you how to do a quick physics setup and how to arrange the heirarchy. After these steps you have a fully functional driving vehicle inside of the Unity game engine. The two links below are the download locations for both scripts required in this tutorial:

Car Script - http://dl.dropbox.com/u/16956434/Car_Tutorial_Scripts/PlayerCar_Script.js

Wheel Align Script - http://dl.dropbox.com/u/16956434/Car_Tutorial_Scripts/WheelAlignment_Script.js

Category:

Film & Animation

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (PolyNurb)

  • i followed the tutorial, test the game, but the wheel rotates sideways, still with the car but the rotation is wrong. so i try things, it turn out this happens when i applied "wheel allignment script" to wheels' mesh.

    if i remove the script the car moves ok, but no wheel animation (when steering).

    before the game start everytings look ok, but when i start the game, the wheel automatically rotate them self in the wrong direction @@. Maybe its because my 3d app, cause i use 3ds max, i dont know..

  • @arienrivendell I would check the pivot points on all of the wheels in your 3d application. Make sure history is deleted and transforms frozen (in 3d app)...also make sure to center the pivot on each wheel. What the wheel align script does, is align the art wheels to the wheel colliders and rotates them as the car moves. Your issue is the wheels are rotating around the wrong axis. It means something with the art geometry of the wheels is not right...gotta be in the 3d app.

  • Moving works, but when I start my game wheels separates from the chassis and spins about 1 meter away from the middle. Centering them doesn't work, what should I do?

  • @Minecrafterman12 I would check the pivot points on all of the wheels in your 3d application. Make sure history is deleted and transforms frozen (in 3d app)...also make sure to center the pivot on each wheel.

  • i saw this posted in the android part of unity forum's,havent seen the whole tut.

    but how will this work for/on android?(i dont have audio ATM so i dont know how you controlled the carthingy)

  • @andybruintje - It should work exactly the same on Android as it would iOS. It's no more intensive for either platform. It uses the same physics, same scripts, etc. This is actually a pretty decent solution as it uses only one simple box collider and (4) wheel colliders. You can model a car at a good resolution, maybe about 1200 triangles with a 512x512 texture to cover the body and tires.

see all

All Comments (21)

Sign In or Sign Up now to post a comment!
  • Thanks man ! You're a life saver ! :D

  • awesome!

  • In the begining he said "a quick tutorial"

  • Ty alot

  • @2centthompson thanks

    

  • this is nice but im not sure i can use it im my zombie game becuase i want it to be enterable how could i make the script make the car enterable

  • @GreenGameProductions use a mesh collider

  • if I made or downloaded a more realistic model (not a box) how would i get the box colider to fit tightly?? or would it have to be bigger then the model!

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more