Car Tutorial (412289)

wow, this new resource, is way way beyond awesome!!, i have been struggling with vehicles and the infamous wheel collider for soo long, now i can see what i was doing wrong.

i can now keep making progress

thank you so so much, you rock the world 8)

A+++++

Well that could be it, I’m on basic (free) as well. I’ll just ignore it for now.
:wink:
I have to try this on one of my cars and tracks anyway, so it could be some pro asset causing the issue.
On that note, I think I found out what was going wrong with my imported car’s wheels. Unity wants the z axis pointing forward, while Max sets it to the side. :roll:

This is a GREAT tutorial. I just spent a couple of months getting my driving game to a usable state, starting out with the tutorials by Andrew Gotow and a few others, and rewriting, adding functions, and tweaking from there.

I already have worked out a very nice driving model, but I’ve been looking to add some different functions and behaviour to it. This tutorial has given me new ideas on how to work those ideas, and showed me how to work out a few things I have been studying the manuals with. Thanks for this great resource. My cars and track are running and looking better already using some of your ideas.

I have been have a “feature” come up with basic free Unity. My main system is older, with the Intel onboard graphics, and the Pro Reflective shaders make it crash every time I try to load the Dodge Charger to have a look. My other two systems have less ram, but with the GEForce cards run fantastic with great performance.

Just tremendous 8). Thanks for making this tutorial public Unity.

Peter.

Great effort!

A fine-looking road system, a nice waterfall example and the camera script are my favs in this project.

A small glitch that I noticed is that the camera in some cases lerps continuously between “going-to-the-front” and “going-to-the-back” of the car and does not result in some state. I didn’t have time to check if it’s just a configuration issue.

very nice job, i might start up with this next, after my rts pack is done, i might start an fps game.

I must say its incredible, great work guys.

I only see sometimes the car wont stop 100%, and keeps moving forward slowly, and the camera glitch someone mentioned.

There are few problems with physics, specially when the car goes flying through air, but i guess that’s Unity 2.6’s fault and hopefully will be fixed with the new implementation of PhysX on 3.0.

One thing: i guess not only me, but other artists as well, would love to see some workflow, making of or even a tutorial for the racing track. It looks amazing!

Graphically awesome, but in my opinion… the car controls are really unnatural. The car rotate weirdly, the suspension is not really accurate, and sometime the car just fly in the air ;. But it’s good looking.

Rewii93

@Rewii93

I don’t know, I find it quite accurate to real life physics, and less accurate to gameplay physics. More like a simulation game.

If I were to make a car game, I would use this as a basis and make it completely on the play factor.

I 100% agree but I think these guys are basing there opinion off of the included physics instead of the advanced physics that you have to manually apply to the car.

True, Ken.
I’ve read through the tutorial and it states that some things will need to be “tweaked” to your liking/needs(see section 2). Definitely a good starting point. In my opinion, the only things missing are a start/finish line and a lap counter/timer, but they could be scripted in later.
Next step for me is to try the scripts etc on my test car. It isn’t made quite the same as the car in the tutorial, so it could be a challenge. if all else fails, I’ll import the Challenger into my scene and go from there.

:wink:

I use my own car with the tutorial and now i am getting an error:

NullReferenceException: Object reference not set to an instance of an object
Car.UpdateWheelGraphics (Vector3 relativeVelocity) (at Assets\Scripts\JavaScripts\Car.js:315)
Car.Update () (at Assets\Scripts\JavaScripts\Car.js:93)

And only the wheelcollider appears for the front left wheel and the collider appears at the center of the car, but the wheels all have their center in the wheel.

What am i doing wrong ??

Really nice tutorial, and just in the right time for me. We just started working on a small hover-car racing game a week ago and I was struggling with the driving model.

Does anyone have any suggestions how to tweak the car model from the tutorial, to feel more like a hover-car(with a jet engine on the back)?

There’s a script in this thread which does that. Hovercar physics is generally much more straightforward than real car physics, so it’s probably easier to start with this than to adapt the script from the car tutorial.

I tried that script andeeee. It doesn’t work if the surface beneath is not flat. It just starts flying around erratically.

And even if it did work, it still needs a lot of tweaking to get that hovercar feel. (which is something I’ve been trying to do for a week and I just can’t get it right). I don’t think it’s the right approach trying to simulate actual hovercar conditions. I’m looking for that Wipeout feel.

The car tutorial physics actually seem to give me a nice starting point. I feel I could get good enough feel, with a little bit of tweaking in the right places.

Time to roll up your sleeves and get it done on your own! Take the new tutorial, and the other script which doesn’t work and get to sorting it out! Not everything is ready to be handed to you so let you be the first here! :slight_smile:

Great tutorial and works SWEET on my five year old Powrbook 1.67. BUT it really only covers what is already readily available in many other tutes - a single car and the physics of said car. What about setting up opponent cars etc? that’s the stuff I know I’m gonna get stuck on. I have a car model up and running already but I would like more info on the other aspects of a racing game… enemy cars, countdown timers, lap checkpoints and the like…

Forgive me if this stuff IS included (I only had a brief glance at the tute today) and also, I really do appreciate this… great quality all round! I’m probably just asking too much :wink:

In case this helps anyone else applying these scripts to their own models…

My vehicle’s wheels were sinking into the ground, then going back to normal in the air. This was partly due to the fact that the wheelRadius variable is being hardcoded at 0.4. Worthwhile to make that not private I think, depending how your model is set up.

Also had to change where the collider was getting its radius:
wheel.collider.radius = wheelRadius;

…instead of grabbing it from the tireGraphic.

Thanks for a great tutorial!

I have a strange problem when making a car using my own models. I have a basic go-kart frame and tires, made them using Blender. Tires have correct center point. I had to make empty game objects for every wheel so that I can get the car script to accept them. When I run the game (car drops on a plane that has a box collider) the wheels pop off and move to strange places but the car handles as it should. Here’s some pictures:

What the f
http://i4.aijaa.com/b/00298/6146738.png

That’s my setup
http://i7.aijaa.com/b/00880/6146747.png