why won´t we do a “perfect” car script ?
i think many of us want to do a race game or something similar.
the race tutorial is a great one, the car wizard is also very good, and the vehicleexamples are a great way for the skidmarks, for the ground dust, why dont combine all things together in a wonderful “unity car”
so things a car need is
steering angle according to speed (is in car tutorial, wizard)
engine sound maybe with multiple audios crossfading
ground effect (in vehicle example)
skid marks (in vehicle example)
choosable between automatic and manual shifting
(in car and vehicle example)
a hud attached (only gui text in both scripts)
easy to use damper and spring (only front and back axle) maybe an addon for the existing wheel collider)
wheel grip easy adjustable
handling tendency (in vehicle example)
message displayer
scoring
maybe “fun functions” for example
light switch on/off
on button jump
change texture
mount weapon
fire weapon
“turbo boost”
horns
indicator lights
radio (jukebox) like in gta
the lovely trailer hitch function
for me personal this would be a great “time saver”, and i think for all in the community this could be a really good help.
so we got so many functions defined, many different solutions, so many work is already done.
its just an idea from me, hopefullly i do not hurt the great coder guys, wish i were one…jealous
Yeah, it’s kinda confusing, which one to use? I’m using the vehicleexample script in my latest bit, but yoggystyle cars are very convincing, and tweaking the raycast wheels seems easier than the wheel colliders.
They may have posted on this elsewhere, but I wonder what techniques the soon-to-be Unity Racing Tycoons (i.e. Seon from Sector3, Jon from Gravek, etc…) used for their vehicles, and why?
I’m working on a (hopefully) realistic Car model using the Pacejka formula. Only thing holding me back is this damn bug where I can’t move forward! And nobody seems to be able to help me!
Edit - By moving forward, I mean I can’t move along the car’s local z axis, like you’d normally (think) you could.
We are using a ray cast method similar to Yoggy’s example, as we found it considerably faster and yes, easier to tweak. Our cars actually have very little adjustment controls beyond radius and suspension settings. The more control we introduced, the slower the performance.
I’m confused though is there another example named “vehicle_example”? is this the same as Race_Demo? or the Car_Tutorial?
Checked out your latest bit polytropoi … for me the web player car slides around a bit, is that a frame rate issue?
The StuntMania car at Sector3 had similar behavior for me on my box until Seon pointed out to me I had the option of adjusting the frame rate, after which it ran really smoothly and appeared to have much better grip. (Nice work by the way Seon) …
Curious to know what method Gravecks Laser Warrior car uses.
Oh yeah … add to that list of features wanted a replay script!
We do need a simple car script/implementation indeed.
One single script that you simply attach to a (4) wheeled vehicle model, link the four wheels that have raycast colliders to variables in the inspector, and away you go. Simple variables visible in the inspector to adjust speed, friction, radius and suspension (bounce) and that’s all most need.
The front (or rear or both) wheels also need to turn and could I also get a setting so that the car will right itself if tipped?
Please let me know when I can drop that magic script on my forklift model please and two minutes of linking later have a nice ride
Hrm, I couldn’t find the thread where it was posted. I think some of the geometry (the jeep)was copyrighted, so they couldn’t officially distribute it. So I went ahead and posted it here, and will beg forgiveness rather than permission if it’s a problem. It has great examples of various types of vehicles: jeep, tank, plane, boat, helo, etc.
The car script in this is relatively easy, it creates it’s own rigidbodies and colliders. But I’m gonna try the raycast method now, to improve my usual crappy performance.
Hey Davey,
Im not quite sure what issue youre having, would you mind posting a screenshot?
Ideally all 5 objects(chassis and wheels) point forward on z axis, and wheel colliders have a line that points down, Things can be tweaked by inserting E.G.O.‘s and reparenting after the create car function is perfomed, if your axes’ are aligned in other ways…
You can contact me direct if you want a hand with this, or carry on posting here. I like your forklift. Happy to help.
AC
I would like to see a car wizard that includes a realistic drag and drop solution. Why would it have to be only 4 wheels though? Why not define the wheels as simply turning, powered, etc. in an array.
But, while we are at it, why not make a good AI portion to the wizard.
I am trying to find a good source for AI to a car. I looked over OpenSteer and a few others.
Why not make a logic in the script… if AI… provide starting waypoint etc.
Screen shot posting shortly … stand by … actually it’ll have to be later when get home from work … file is not on my laptop.
But I’m not even sure I’m doing the “create car wizard thing” correctly (sigh). One newbie thing to cover in SFO I guess.
EDIT LATER … OK, it seems that Max isn’t using the same axis as Unity … here’s the screen shot …
Now I have to figure out how to flip these things around. Ron (Studio Max guy) isn’t available so I’m fiddling in Cheetah 3D to try to figure out if I can reorient the axis or something. This explain alot.
easy DaveyJJ… create an empty object that you orient correctly and make the collider a child of it
Update (due to post that follows)
The intent is really to bring the thread to a close and be helpful to all who will read it, even if years later. I am sure you had your answer already.