Let's say analog button is bound to both digital and analog brake. This input set can be taken as an example:
Brake { Time = 0:15.790, Pressed = True }
BrakeReal { Time = 0:15.800, Value = -51339, NormalizedValue = -0.783371 }
BrakeReal { Time = 0:15.810, Value = -39482, NormalizedValue = -0.6024475 }
BrakeReal { Time = 0:15.820, Value = -28810, NormalizedValue = -0.4396057 }
BrakeReal { Time = 0:15.830, Value = -27625, NormalizedValue = -0.42152405 }
BrakeReal { Time = 0:15.840, Value = -31182, NormalizedValue = -0.47579956 }
BrakeReal { Time = 0:15.850, Value = -53710, NormalizedValue = -0.81954956 }
Brake { Time = 0:15.860, Pressed = False }
BrakeReal { Time = 0:15.860, Value = -65536, NormalizedValue = -1 }
Analog brake seems to be always after the digital brake (another example supports this theory). So when you have the same button bound on both analog and digital brakes, the "leaving" state is always gonna be from analog - this should maybe stay as it is, even if the digital brake looks nicer, up to debate. The same could potentially happen with Acceleration and other inputs, so it shouldn't be applied specifically to brake. The transition also isn't considered with AdjustToFPS
set to true
, which should be the primary focus to resolve.
Another example what can happen:
Brake { Time = 0:44.690, Pressed = True }
BrakeReal { Time = 0:44.690, Value = -62603, NormalizedValue = -0.955246 }
BrakeReal { Time = 0:44.700, Value = -52525, NormalizedValue = -0.8014679 }
BrakeReal { Time = 0:44.710, Value = -47189, NormalizedValue = -0.720047 }
BrakeReal { Time = 0:44.730, Value = -48375, NormalizedValue = -0.7381439 }
BrakeReal { Time = 0:44.740, Value = -57860, NormalizedValue = -0.88287354 }
Brake { Time = 0:44.750, Pressed = False }
BrakeReal { Time = 0:44.750, Value = -65536, NormalizedValue = -1 }
Here, the brake is pressed, also visually shows on the ghost, but is a 0-tick event? I don't know how to visualize that one. Perhaps always taking just the first event of the tick and ignoring the rest, like currently happening at the start of the run.
Generally speaking, it would be best to rewrite the input logic to know how to deal with same-tick inputs and such. Updates will be shared under this issue, everything should happen on a separate branch (to be made).