Driving a car, how to take / make the turn correctly?

Started by
3 comments, last by Edy 4 years, 10 months ago

This is puzzling me for a while, i have a city simulator, where roads are set up as sets of points interconnected with each other. 

Cars try to follow the next point along the road, but when it takes a turn, they tend to miss points completely, because they will never follow a perfect turn, as they have a off-center point of turning. 

I can calculate my center of turning point for vehicles, but i still do not know how to use that to calculate the actual path they should follow, so that the turns take that into account. 

For simplicity, car tyres can only turn fully or not at all, so they cannot choose any turning radius. 

 

So, how do i calculate when i need to turn when my center of rotation is off-center like for cars? 

 

Projects: Top Down City: http://mathpudding.com/

Advertisement

Define off center turn, and turining in your simulation more correctly.

So, do you suggest that i make the off center turns something set manually by map designers or could i simply calculate this somehow? 

 

Projects: Top Down City: http://mathpudding.com/

The Dubins path may be quite interesting for you:

https://en.wikipedia.org/wiki/Dubins_path
https://www.habrador.com/tutorials/unity-dubins-paths/2-basic-dubins-paths/
https://gieseanw.wordpress.com/2012/10/21/a-comprehensive-step-by-step-tutorial-to-computing-dubins-paths/

This topic is closed to new replies.

Advertisement