Hi!
I want an input playback effect for the player (like reverse walking after they walked a distance). This was fairly easy to start considering Unity has an InputRecorder wrapper class. Yet the desired effect actually implies using the opposite input. So if player does W, then E, then W. Then the desired recorded input would be S, then A, then S.
A solution that comes to mind is to “hijack” the input upon its event starting, and if we are recording the player’s input, then store the opposite axis. The methods that come to mind to access the input events is
InputSystem.onEvent += (eventPtr, device) = > {};
and in here somehow change the input value. My question is how?