I know a lot of you don’t like to use wheel colliders but for those that do, has anyone been able to make their wheels slip or skid? What kind of friction settings should I use?
try to set it dynamically in the code.
I would find the low and hi limits (do some racing with different values and figure out the least and the most friction you should ever have) and then write a function that adjusts the friction based on speed and angle difference between wheel orientation and car orientation.
The more extreme the speed and the further the angle of the tire away from steering straight ahead, the lower the friction. and vice versa.
use a variable modifier to adjust the friction up and down. say, call it “slip” or “grip”.
give each kind of tire a slip/grip rating and it will directly translate to how fast the friction raises and lowers when the rubber hits the road.
if you choose a “grip” tire, then you can conditionally require the player to tap the breaks to “engage” the drift (lower friction) at higher speeds beyond the tolerance angle of the tire.
if you choose a “slip” tire, you can set a speed and turning angle beyond which the tire starts to drift all by itself.
the friction should also be relative to the length of time you have been drifting. This should eventually start to raise the friction again because you cant accelerate very well without friction. So this would also slow you down.
so your gas pedal (speed actually) should also conditionally decrease the friction. Especially if you are already in a slide.
None of these things by themselves should lower the friction to it’s bottom limit, but the magic combination of speed, turning angle, gas and break should allow you to reach a magical drifting nirvana of slippery goodness.
Of course, it should be easy to reach your maximum grip on the road, but require practice and considerable skill to control the loss of it.
If I were you, I’d display each value you are evaluating on the screen as you drive. I’d even make a funny noise when you reach the magical combination that hits the slippery sweet spot. Or at least keep a running debug log of the lowest values you were able to hit. You will want to know when you hit the desired values to be able to decide if the play mechanics are doing their job or the code needs to change. This will also help you to rate the tire with a slip/grip factor because you actually know how it handles. Remember that at this point, you should be using different values for different tires. Don’t discard values that you don’t like unless they totally break the game play. Other people may want a tire that you would never put on your car.
Keep in mind, I am a theorist and have no actual experience doing this in Unity. I’ve done this in other engines, but haven’t gotten to it in Unity yet.
sorry if you aren’t making a racing game.
I hope this still helps.
This is the abridged summary of my lecture on racing play dynamics. For a full transcript, copy and paste everything I post on this topic.
Your mileage may vary.