I did look into "moving" the rail planner as a player is placing it, however (from what I could find in the documentation) this is not possible. The planner that places long stretches of track is completely inaccessible to the LUA api. The most I can do with it is add a rail item to the player's cursor, and remove it when I want the planner to be cancelled.
I did also float the idea of switching sides if you make a turn too sharp, so that after a sharp left turn your planner is on the "left" hand side of the track. However I found a few problems with this:
- It adds a lot of complexity to the code base.
- Its complex to use since you need to be aware of which side you are currently building.
- It can result in unexpected behavior if you are planning a long path.
- It won't help in many scenarios, such as U turns.
While I haven't looked into if this would work, I did also consider making use of the legacy 45° turn rails that cannot be normally added any more since they can make turns 2 tiles (1 rail width) tighter. I decided against this though, since it doesn't solve all the problems, and the factorio devs have said they plan on dropping support in the future.
Unfortunately I don't think the problem of sharp turns can be solved with a mod - at least with the current API, while maintaining an easy to use interface. My best bet as a mod author is to mitigate the issue, where I have a few plans in the pipeline. Alternatively, maybe I can convince the factorio devs to make the two lane planner a standard feature that doesn't allow for sharp turns. Honestly that'd be great.