Physics are getting better and better, but it's still very far from my expectations. I still think my tests were successful, however I'll probably rewrite the code that controls traction. As you can see in the video, the traction is low at low speeds and the car slips easily, but I need more slip. Actually it's pretty stable even when I push the pedal to the metal. A real world car like this would spin immediately in this situation from standing position.
Unity's wheel collider component is very tricky, because if you reduce the friction, it'll also affect the RPM of the wheel and it'll make the car slower if you reduce forward friction. It would be expected that it'll make the wheel rotate easier and spin and make burnouts, but it doesn't happen. So it needs a little bit of cheating by increasing the engine torque to balance it. So for example, half the friction, double the torque. But it also mean, it won't make the acceleration worse. Just the rear tyres will spin more. That is the current problem. You can push is hard, it'll make nice burnout, but the acceleration will be good too.
I was thinking to reverse the whole thing. Artificially increase the calculated engine RPM instead of multiplying the torque. It would give the feel the engine's RPM is higher (also sound pitch is calculated from RPM of course), also the visual wheels (the wheel meshes) should rotate faster using a simple multiplication.
Unity's wheel collider component is very tricky, because if you reduce the friction, it'll also affect the RPM of the wheel and it'll make the car slower if you reduce forward friction. It would be expected that it'll make the wheel rotate easier and spin and make burnouts, but it doesn't happen. So it needs a little bit of cheating by increasing the engine torque to balance it. So for example, half the friction, double the torque. But it also mean, it won't make the acceleration worse. Just the rear tyres will spin more. That is the current problem. You can push is hard, it'll make nice burnout, but the acceleration will be good too.
I was thinking to reverse the whole thing. Artificially increase the calculated engine RPM instead of multiplying the torque. It would give the feel the engine's RPM is higher (also sound pitch is calculated from RPM of course), also the visual wheels (the wheel meshes) should rotate faster using a simple multiplication.
No comments :
Post a Comment