was watching an articulated bus steer this morning, and it made me think about how we handle vehiclenr turning.
right now, when we steer we rotate the entire vehicle, meaning the frunt end turns in the direction steered, and the back end turns in the opposite direction, pivoting around the center of mass of the vehicle (no really, it calculats the mass and then the center). one of the side effects of this is that trailer movement doesn’t fit into this very well.
I’m thinking if we designate some wheels as drive wheels and others as steering wheels*, we can handle some of this better. Then instead of simply rotating the vehicle, you’d instead apply lateral movement at the steering wheels, and rotate the vehicle to match. in order to keep steering from getting too complicated, we’d probably still have turn make steering wheels offset about 12.5 deg to the left or right**. a trailer hitch would be designated as a steering point, so the pulling vehicle would displace that point, and then the trailer would follow.
As for implementation, when going straight everything is the same, when turning, we’d shift all steering wheels in a vehicle laterally every other step*** and rotate the vehicle to match, rotating the vehicle around the average of the positions of load bearing wheels (not counting steering wheels). This actually turns out simpler than I thought it would.
*also load-bearing wheels, but they don’t matter for steering.
**about 1/16 of a circle, this is how much we turn per turn right now.
***12.5 deg remember, meaning you move one square laterally for each two squares travelled.