How Wheels Work?

I’m currently working on a mechanic in my game where we can build vehicles by putting blocks ourselves. But there’s one thing I don’t understand yet, how do wheels work in games in general?

I mean, is it through the physics engine or by applying artificial forces added with code?

In other words, do the vehicles move with the friction that occurs when the wheel touches the ground and turns, or is it simply a force applied to the vehicle when the wheels turn?

I have been working with the Epic Chaos Vehicle Movement Component (CVMC) for a tank, and the plan was to get the tank working first as it would be the most difficult, then all the standard vehicles would follow. Some of the things I learned included:

CVMC uses ray tracing on each wheel to discover the distance to the ground or other surface, thus each wheels’ bone must be configured Z up and X forward to work properly.

CVMC performs its own light weight physics for the entire vehicle for performance reasons.

CVMC will apply torque to the wheels and that in turn generates forward (or backward) movement by friction against the ground or other surface that make contact with the wheels. This is partly why you as the developer must configure the engine (how much torque at various RPM does it deliver to the wheels), the transmission and drive train (2 wheel or 4 wheel), and also the front and rear wheels (how much friction, diameter, etc.).

CVMC will eventually support full replication, but this is still not working fully. They are trying to replicate the physics, which is very difficult. [I would never attempt to replicate physics.]

CVMC manipulates the vehicle skeleton like an endless root motion - the actual Actor location never moves, but the vehicle mesh/skeleton/collider do. [This approach is beyond counter intuitive.]

Those last two reasons are why I cannot use CVMC.

Some how you need to discover the location of any surface below the wheel to a distance matching fully extended suspension. How you decided to manage physics is a design choice with trade offs. Just having suspension or not is a design decision with trade offs.

You can choose to use physics to apply forces, drag, friction, etc. Or you can use arcade controls and provide psuedo physics as much or little as you want. Again, a design trade off.