I need to think a way to do a car (actually a truck) to be driven. I need to find a way if I turn the wheels, the car must follow the path correctly. I’m struggling a lot to think in a way that I can do that properly, I googled but I can’t find anything. Someone can help me or even know a tutorial/example of how to do this? can be a simpler manner, I don’t need the Y coordinate (the car won’t fly), only Z and X.

I’m thinking in finding the point and translate it to the origin (0,0,0) and then, rotate the modelview matrix around Y axis, and then, translate it again to the original location. But I need to know constantly where is the intersection point.

To find the intersection point will be a [censored], how can I track the point with a function if the wheel axis is moving around?

you may build two planes. The 1st with a normal that is the front wheel forward direction and a point that is the front wheel center. The 2nd with the rear wheel forward direction center.

Then it possible to find the planes intersection which is a line. With the line equation:

x = ay + b
z = cy + d
y = K (a constant)

you choose y value as the wheel height from the floor and you obtain x and z values at the intersection point.