My car keeps going off the line, and I am not sure on how to make my car stay in the line. Like it feels its slippery. How do I fix that?
My car keeps going off the line, and I am not sure on how to make my car stay in the line. Like it feels its slippery. How do I fix that?
What chassis are you using for the car? Seems like you could maybe use some smoothing out of the steering input.
It’s my own chassis. I don’t know whats the problem, I tried adding more weight to the car, and didn’t help. Entire car is massless, and it doesn’t collide expect the wheels.
If its all physics here, have you tried setting custom physics properties on the wheels? You might be able to get away with bumping up the weight of friction.
What properties I should set? I am not very familiar with what each property does, I only know that density is the weight or something.
You’re looking for Friction and FrictionWeight here. Try playing around with these numbers. The Friction value determines the level of grip to the colliding surface while FrictionWeight is essentially the overall impact of that Friction. If you put Friction to 2 and FrictionWeight to 100 (both maxed) the car should essentially have zero drift.
I did, It got better but still unstable.
Yeah you might have to play around with the numbers a bit to get it just right. I usually simulate car physics so I wouldn’t know the sweet spot.
I used A-Chassis for a test, and the car is very stable and stays in one line, my chassis on other side, does everything so unstably. I am not sure what I am doing wrong though, I don’t think that the physical proprieties are everything.
Have you added Ackerman steering geometry to your chassis?
Nope. I don’t even know what it is
I’m just getting into making and rigging cars, and I’ve been watching Sleitnick’s car rigging tutorials. He mentioned that the entire chassis of the car should be massless, but you should have a part somewhere in the middle that has mass to represent the center of gravity for the car.
He also mentioned changing up the friction, like @Barothoth said to do. His tutorials on it are pretty basic from what I’ve heard, and I’m sure your chassis is way more complex, but I guess it could be something to think about.
I did watch his tutorials, though I don’t he explained on how to keep the car in one line. Because if I steer a bit, it will not stay in the line, instead it will keep going that direction I steered it before, and after couple seconds it finally does come back straight. I don’t how to explain it, but A-Chassis is a good example.
Maybe it has something to do with the damping on the springs (if you’re using any)? I know whenever I lower the damping on springs, it can make the car wacky. I’m not really advanced in this area of programming yet. Sorry
Its probably because your tires turn quickly and going left and right concurrently. Your suspension and time for the front wheels turn probably need to be adjusted.
It’s the steering time, if you make the wheels angle return to 0 as soon as they stop turning it should be better
Ah okay. It’s basically that the steering wheels need to be at slightly different angles in order to not get slipping on the front wheels. There’s a good image here.
For those who have this issue, I was having this problem when I was making a car kit. The front wheels were all oriented straight however the car would steer on it’s own at times. Setting a BodyAngularVelocity’s cframe to 0 when the input is 0 resolves the issue. It also made the steer handling a lot more responsive.
Could you elaborate on your solution? What are the exact properties set to what value when steering and not steering?
I took a look at your issue, the instability is caused by the mass distribution of your car. For constraint vehicles, you need to implement a lower center of gravity by using a transparent root brick that is almost, if not the same size as your body.
Make sure that the root is centered at the center horizontally, or else the car may lean over the heavier side if it isn’t. This can cause the car to turn on it’s own at times. Keep in mind that if the mass is wayy too low, it can cause your cars to slide.
The root looks like this:
Density of your tires are also an important factor in the instability. Too high of a density can launch your vehicle if it collides into something else. Too low of a density with high friction will make tire contact difficult. Low friction and low density will make your tires too light, almost like a balloon, so you will get that steering issue. For example, I had an issue where a density any lower than 3-4 wouldn’t allow the car to turn at very slow speeds. It even has Ackermann steering implemented.
But the center of gravity is probably the most important here. There’s a reason why SUVs and alike have high roll over risks when steering like that- their center of gravity is higher, unlike something like a sedan.
My friction is set to 2 and the weight at 100, technically I could tune this lower but I found no need to do so. It completely eliminated the instability issues.
To be honest, constraints take a lot of testing and tuning. Let me know if you have any issues.