I’m having loads of trouble making a decent car for my game. I don’t want to use one of the ready-to-use solutions because 1- they are focused on realism 2- most of them involve complex calculations (CPU time not available on the platforms I’m targeting, since the other stuff is quite heavy already).
I’ve tried to make a simple vehicle the ‘right’ way, with 4 wheel colliders, but I simply can’t get it working decently. If they have low friction, they vehicle gets unresponsive, with more friction it flips over, with a lower centre of mass the movement gets unconvincing… I simply couldn’t find a decent setup. I’ve tried various combinations of suspension and friction settings but it was impossible to get anything decent.
The suspension is very important for my game cause some levels are quite bumpy, and I want the thing to be controllable while passing over the bumps and stuff.
Thanks, but to tell the truth, I’m looking for something non-realistic, like Mario Kart DS for example. The cars in that game were fantastic. Very responsive and somewhat convincing. They didn’t use wheel colliders to achieve that though… I’ve tried using a single raycast to make something like MKDS, but I’ve failed miserably… It’s almost impossible to achieve anything decent, for example, I could add the gravity velocity manually and trace a ray downwards from a position on the top of the vehicle, let’s say the dimensions if the vehicle are 1,1,1 and the pivot is in the center of it, then I can trace a ray downwards from 0,0.5,0 and if the ray hits something with a distance shorter than 1, the vehicle is transported to the ‘ray hit point + vehicle.up*0.5’ and the gravity speed is reset, that should work in theory, but it doesn’t work in practice when you have an object in movement because you’re using stupid triangles to reproduce the collision mesh and because of floating point inaccuracy. Not no mention that you have to smooth the vehicle rotation if you’re using the hit normal because of the triangulation of the collision mesh.