How it should work:
"to" is shown by the flag facing towards the HSI bearing arrow, and "from is shown by the flag facing away from the HSI bearing arrow. This should be determined by the aircraft's position relative to the waypoint bearing. For example, if a waypoint is set with bearing 270 W, the flag will point towards the bearing arrow if the aircraft is east of the waypoint ("behind" it), and away from the arrow if the aircraft is west of the waypoint ("in front" of it), regardless of the aircrafts own heading. This can be used to easily extrapolate whether or not the plane is in front or behind the waypoint relative to the bearing, easy as seeing if the flag is pointing towards or away from the HSI bearing arrow, and flying towards the flag, in line with the bearing, will put you directly over the waypoint always.
How it does work:
The flag points towards the HSI bearing arrow when the waypoint is in front of the plane, and vice versa. This makes it so it flips around a bunch when we turn, and it complicates the process of locating yourself. in order to figure out if you are in front or behind the waypoint, you need to see if the flag is pointing towards the HSI bearing arrow, and if you are facing towards the HSI bearing arrow, I've put a chart in the attached image. This has the disadvantage of the flag moving around in turns, as well as not being consistent with real versions of the instrument.
below is very important
Additionally, the marks in the middle of the HSI should be based on 2 degrees per mark, I suspect VTOL replaces it with a flat distance based offset. This makes it really hard to judge your horizontal offset when approaching for a landing, and a barely noticeable deviation on the localizer will put you a whole runway width off course. As you approach the course waypoint, it should become much more sensitive.