Transport Fever 2 type Track system

Hi All! I’m trying to make a track placement plugin for a train game (as seen in the video below). There are a couple features in this plugin that, if possible, I would like to get some advice on.

Video (Transport Fever 2)

  1. Drag to place - At the start of the video I click and drag to create that first segment of track. I know I can figure out how to position the track between the position in the world you started dragging, and the position you let go, but I am not sure how to see if the developer is clicking and dragging, as well as the position of the mouse.
  2. Cursor snapping to track - In the video, when the mouse hovers near a piece of track, the cursor (by this I mean the white circle) snaps to the track along the length.
  3. The cursor itself - how would I get an object like the cursor in the video to move to the mouse’s position in the game world.
  4. Curves - When trying to extend the track, if the cursor is not aligned with the direction of the last track segment, it becomes curved. How would I create a curve like that? I would assume something along the lines of a Catmull-Rom spline, but how would I make sure the new point’s position stays with the cursor while dragging.
  5. Parallel Tracks - This would probably be included with the Cursor snapping feature, as the cursor stays locked to the side of the track unless the mouse points too far away, where it un-snaps.
  6. Points - When a part of the track is selected, and the mouse drags from it. A point is formed. I assume if that segment of track was made using a curve, there would be no point for it to connect to? Also, there has to be some functionality to allow the switching of the point.

Great Thanks for anyone who can help.