I’m unsure whether this is a bug or something basic that I overlooked, so I’m posting to this category first.
Recently, I’ve been working on an arcade constraint-based car chassis. The suspension setup itself is very basic, and I’ve included a recreation of it at the bottom of this post. I’ve gotten most features out of the way, but I’ve been having issues with tire friction.
Specifically, when accelerating from a standstill, the tires slip when accelerating in one direction but won’t slip when launching in another direction:
Notice how on the first launch there’s wheelspin/tire smoke but on the second launch there isn’t.
I initially assumed that it was a visual bug from the way that I calculate wheel slip, but after measuring the car’s acceleration time to 60 studs per second, I determined that the car actually accelerates faster at an angle. I use HingeConstraints for acceleration, and their MotorMaxTorque, AngularVelocity, and MotorMaxAcceleration properties are the same in all directions. Cars with more friction/grip don’t have this issue, and have consistent acceleration times in all directions.
To test this further, I created a separate place and recreated my basic car chassis, minus any of the original code, and came across the same issue:
NOTE: I used the same tire physics properties, car weight, and gravity in the test place. The only code used is for changing the target velocity on the rear wheel hinge constraints, measuring the 0-60, and setting network ownership.
Here are my default tire physics properties:
In the test place, the car consistently takes longer to accelerate at 90 degree ‘cardinal’ angles but accelerates quicker at 45 degree ‘ordinal’ angles. When increasing tire friction, I found that the 0-60 times became closer between angles, and when lowering friction the times would have a greater difference. Since all other variables are the same, I am assuming that the difference in acceleration times comes down to the slower times having more wheelspin.
Here’s the place file if you’re interested in testing:
frictiontest.rbxl (77.7 KB)
The code is pretty short but sloppy, I only meant for it to be a quick friction test.
Basically, I’m wondering how I can get consistent tire friction at all angles, because having some cars accelerate faster at different angles isn’t great to say the least.