hello, excuse my english, i am not american. the unity web site gives a car tutorial, but i tried to put the script into my car, BUT IT JUST DONT WORKS AT ALL FOR ME, I HAVE TRIED COPYING THE "EXAMPLE" CAR
S PROPERTIES ON SCRIPT, BUT IT DOESN`T works, I had search on the web for solution, but nothing. I am deseperated cause I am trying this for a week now… Please, help me, cause I am new to Unity
It is possible something went wrong with importing. So start up a new project or reimport the assets.
Also, make sure you’re dragging the script from the project window to the right part of the car GameObject.
Please, also tell us which script is giving you errors and which errors?
Well,sorry for being late for an answer, I was traveling…well, I am using the car.js in my car,and I am sure that the importing was successful, cause the example “catamount” car is working.But anyways, I inserted the car.js in my car, I organized my car into groups like body, front left wheel,rear right wheel… And I inserted the properties to the car.js with the same values of the example “catamount” car, only changing the objects like wheels, but if I press play and press the buttons to throttle the car,nothing happens…
Note: I inserted box collider on the car, also rigid body to it, and inserted wheel colliders to each wheel.I guess the problem may be on the wheels, maybe on it’s organization.
The organization of the car is similar to that:
Car(center of mass;body(body mesh);wheelfl(mesh);wheelfr(mesh);wheelrl(mesh);wheelrr(mesh)
Now I am also trying to do my own car script, but I Inserted a configurable joint to my disk brake so it could have a suspension, and connected to the body, and it looked fine, but the body has only 1 kg in mass, and I need like 1200 kg, so it would be more realistic. But if I do that, of course the spring will be down, so I changed the joint’s values to work well, but when I increase much “spring” or much damping to the Xdrive, the disk brake starts to shake really fast, and I don’t get the desired effect,so which properties should I put into Xdrive so the disk brake can sustain 1200 of mass?
I have the same problem. I have followed the steps of http://unity3d.com/support/resources/files/CarTutorialSection_1.pdf with the provided car model. It works. I then made my own custom car in blender, making sure its hierarchy matches that of the demo-car exactly. I have followed the instructions given in the pdf again, but my car doesn’t move.
After experimenting with the scene for a while I have narrowed it down to the wheels. If I use the demo-car wheels on my custom car it will work, but using my own wheels, even when setup exactly the same way, it will not work for some obscure reason. The script creates the wheel-colliders on the fly, and they just fail to do anything. My wheels sink halfway into the ground until the meshcollider of the carbody stops the fall. I tried to set the wheel-colliders up by manually, but that didn’t help either.
I tried all week hunting down the magic difference between my homemade wheels and the provided ones, but I just couldn’t find what prevents mine from working.
I solved this problem with my own model by duplicating the front wheels, renaming them and shifting the back to the position of the back wheels in unity… This and redoing the tutorial 15 times, and in an urika moment it worked! Sorry I couldn’t isolate the exact problem, but keep trying it and changing things would be my advice for those still struggling…