about 3 errors [HideInInspector] public Rigidbody rigidbody; void Start() { rigidbody = GetComponent(); rigidbody.centerOfMass = centerOfGravity.localPosition; } it will work
+C3lluloidDream - I have a solution. In the hierarchy change: 1) For the car "Car - Decent Skid" go to the Rigidbody component. mass = 350. 2) For each wheel (Wheel.F.R, Wheel.F.L, Wheel.R.L and Wheel.R.R) change in the Wheel collider component the Suspension spring = 900. Sideway Friction (Extremum slip = 0.02) Aditional, if you like can change the values of Main camera in the Smooth Follow script: Distance=10, Heigh = 5. .
+Angry Hat - I have a solution. In the hierarchy change: 1) For the car "Car - Decent Skid" go to the Rigidbody component. mass = 350. 2) For each wheel (Wheel.F.R, Wheel.F.L, Wheel.R.L and Wheel.R.R) change in the Wheel collider component the Suspension spring = 900. Sideway Friction (Extremum slip = 0.02) Aditional, if you like can change the values of Main camera in the Smooth Follow script: Distance=10, Heigh = 5. .
Hi, There is this problem with my car that I couldn't fix so far. When I jump at the edge of a plane, it doesn't just fly in the air based on gravity but instead, it falls down directly. Any idea how to fix this?? Thanks in advance.
Is there a way to dampen or increase the mass of the rotation of the vehicle? Something that I noticed in some games like Forza is that they make it more difficult to spin the vehicle like it has a lot of mass. When you hit the front or the back of the car from the side, it has lots of resistance from the impact and the car doesn't spin very fast. Also when you hit a wall, your car doesn't align to the wall and get stuck. Is there a way to do this in Unity? Angular drag is not what I want btw. I guess maybe increasing the mass might work, but it makes the car harder to move. It's not drag, I just want it harder to get the car's rotation to accelerate.
huh, their problem is too much grip, meanwhile my problem is that after i turn on gizmos to see the wheel action they look like they are doing burnouts everywhere
+failprone - I have a solution. In the hierarchy change: 1) For the car "Car - Decent Skid" go to the Rigidbody component. mass = 350. 2) For each wheel (Wheel.F.R, Wheel.F.L, Wheel.R.L and Wheel.R.R) change in the Wheel collider component the Suspension spring = 900. Sideway Friction (Extremum slip = 0.02) Aditional, if you like can change the values of Main camera in the Smooth Follow script: Distance=10, Heigh = 5. .
+Tito Oliveira - Yes. In the hierarchy change: 1) For the car "Car - Decent Skid" go to the Rigidbody component. mass = 350. 2) For each wheel (Wheel.F.R, Wheel.F.L, Wheel.R.L and Wheel.R.R) change in the Wheel collider component the Suspension spring = 900. Sideway Friction (Extremum slip = 0.02) Aditional, if you like can change the values of Main camera in the Smooth Follow script: Distance=10, Heigh = 5. .
Mario Cardona I tried your suggestions in the actual unity and still does not. work. 350kg also seems to too light IMO. In jumps and wiggles too strong. any new thoughts on this?
WheelCollider in unity 5 is broken af. Wheel collider always appears perpendicular to the wheel no matter what I do. It only works for the in-built cube or other shapes. It doesn't work for custom models.
If you're still looking at these, a 2020 version would be great, what you've created is a really great starting point for beginners!
about 3 errors
[HideInInspector]
public Rigidbody rigidbody;
void Start() {
rigidbody = GetComponent();
rigidbody.centerOfMass = centerOfGravity.localPosition;
}
it will work
Ah dat 60fps 1080p,so beautiful.....
Excellent prototype for me. I want to make like a "toy car racer" multiplayer project and this is perfect for a placeholder car script.
Anyone else have problems with this project in unity 5.0?
C3lluloidDream Yes! would be great with an update :)
+C3lluloidDream - I have a solution.
In the hierarchy change:
1) For the car "Car - Decent Skid" go to the Rigidbody component. mass =
350.
2) For each wheel (Wheel.F.R, Wheel.F.L, Wheel.R.L and Wheel.R.R) change
in the Wheel collider component the Suspension spring = 900. Sideway
Friction (Extremum slip = 0.02)
Aditional, if you like can change the values of Main camera in the
Smooth Follow script:
Distance=10, Heigh = 5.
.
Please, did this project work on Unity 4.6.1 ? Big thanks
Yes
Any chance of an update with latest version of Unity? I've tried tweaking the values a lot and no luck.
can you please make a version that works in untity 5
I liked the talk! very informative about car physics! truth teller!!!
Doesn't work in unity 5.1.2
:/ could you do an update?
+Angry Hat - I have a solution.
In the hierarchy change:
1) For the car "Car - Decent Skid" go to the Rigidbody component. mass = 350.
2) For each wheel (Wheel.F.R, Wheel.F.L, Wheel.R.L and Wheel.R.R) change in the Wheel collider component the Suspension spring = 900. Sideway Friction (Extremum slip = 0.02)
Aditional, if you like can change the values of Main camera in the Smooth Follow script:
Distance=10, Heigh = 5.
.
+Mario Cardona Mario Cardona mi suona italiano.
Il nome di Mario è molto comune in America Latina.
Mario Cardona So you translated that with Google right? XD
anche voi. xD You too.
shouldn't you be using 2 Pi instead of Pi your speed calculations because c = 2Pi *r
Any idea why every time i try to open the project it crashes unity?
Hi,
There is this problem with my car that I couldn't fix so far. When I jump at the edge of a plane, it doesn't just fly in the air based on gravity but instead, it falls down directly. Any idea how to fix this??
Thanks in advance.
omg. thats great!! looking foreward for others tut's
Is there a way to dampen or increase the mass of the rotation of the vehicle? Something that I noticed in some games like Forza is that they make it more difficult to spin the vehicle like it has a lot of mass. When you hit the front or the back of the car from the side, it has lots of resistance from the impact and the car doesn't spin very fast. Also when you hit a wall, your car doesn't align to the wall and get stuck. Is there a way to do this in Unity? Angular drag is not what I want btw. I guess maybe increasing the mass might work, but it makes the car harder to move. It's not drag, I just want it harder to get the car's rotation to accelerate.
Thanks, this is pretty cool :)
How to have wheel collider and on the mesh also have a mesh collider ?
What's the difference between blob light projectors and spotlights? I know it's kind of off topic, but I can't find it on Google....
Define effects in this scenario.
Can you make a script for a rotating camera around the car?
search for third person camera script
can't add component'TireToWheel' because it doesn't exist. Check to see if the file name and class name match. ???
i paid no attention to any of this, slapped on an XR rig, and threw up on my carpet. good times
Is it working for unity 5 now??
Sir close issue and bug reporter problem in unity please reply
please please create a new tuto about car controller with new unity version it's very important for me
huh, their problem is too much grip, meanwhile my problem is that after i turn on gizmos to see the wheel action they look like they are doing burnouts everywhere
I was wondering if I could use the car code for commercial use.
He posted it and even says in the video that people might want to use the code.
Isn't it wrong to use the radius to calculate the speed? I think we have to use the diameter (2 x radius).
how can i make a steering wheel and brake and move button for mobile??
That is not this hard ,learn some unity mobile controls
File throws an error as of Unity 5 .. bummer
Thanks for the assist! Just got the game running in 2018.2.12!
Thanks
I want your syntax highlight!!!
then use visual studio lol
Doesn't work in the new version, that makes me a sad panda
+failprone - I have a solution.
In the hierarchy change:
1) For the car "Car - Decent Skid" go to the Rigidbody component. mass =
350.
2) For each wheel (Wheel.F.R, Wheel.F.L, Wheel.R.L and Wheel.R.R) change
in the Wheel collider component the Suspension spring = 900. Sideway
Friction (Extremum slip = 0.02)
Aditional, if you like can change the values of Main camera in the
Smooth Follow script:
Distance=10, Heigh = 5.
.
Yeah, this project needs an update. It throws me rigidbody errors.
Anyone got a fix for this bad boy?
Plz fix this for unity 5.0
In my 2019 version it runs very slow
Please make tutorial 3d Top Down Shooter for mobile !!! PLEAAASE!!! YOU ARE AWESOME!!!
Didn't anyone solve the issue when converting to a unity 5 project?
+Tito Oliveira - Yes.
In the hierarchy change:
1) For the car "Car - Decent Skid" go to the Rigidbody component. mass =
350.
2) For each wheel (Wheel.F.R, Wheel.F.L, Wheel.R.L and Wheel.R.R) change
in the Wheel collider component the Suspension spring = 900. Sideway
Friction (Extremum slip = 0.02)
Aditional, if you like can change the values of Main camera in the
Smooth Follow script:
Distance=10, Heigh = 5.
.
Doesn't work, the Wheel Collider aren't functionnal in Unity 5...
It works. I have Unity 5 too.
Mario Cardona For me in Unity 5.3.5f1 it doesn't work
Mario Cardona I tried your suggestions in the actual unity and still does not. work. 350kg also seems to too light IMO. In jumps and wiggles too strong. any new thoughts on this?
It's a shame this is borked on the latest version of Unity (even with changes from comments). It looks pretty neat.
very usefull
WheelCollider in unity 5 is broken af. Wheel collider always appears perpendicular to the wheel no matter what I do. It only works for the in-built cube or other shapes. It doesn't work for custom models.
did you found a solution?
What if you want the AI to control the car with the said script? Is it possible?
When I try to run the game it just give me tons of script errors about the Center of weight and how it dosen't show as an extension....
replace "rigidbody" with "transform.GetComponent ()"
@@kylec33 thank youu
would of been nice to shown us all of the code 11:07
Or you can download it since he posted it. That being said, it's no longer completely valid with the newer wheel colliders in Unity 5.
8:45 particle fist em'
Why did you cuss!! I was watching this near my family!