refunct-tas
refunct-tas copied to clipboard
[TAS Component] Rework inputs in recording files
Currently, inputs are sent to and received from recording files with their respective Keycodes (SDL keycodes for Linux and Microsoft's Virtual Keycodes on Windows. This makes it tricky to implement a savestate system with read-write mode as savestates would need to cancel out all current inputs whilst sending the same inputs on the next frame.
Therefore, we can use the functions provided to us by the Refunct SDK, as well as some functions supplied by the engine to simulate keypresses. This also means you can TAB-out (though doing that is not recommended 😄)
Axis functions are:
AMyCharacter::MoveUp(float);
AMyCharacter::MoveRight(float);
AMyCharacter::MoveForward(float);
AMyCharacter::LookUp(float);
AMyCharacter::LookUpAtRate(float);
AMyCharacter::Turn(float);
AMyCharacter::TurnAtRate(float);
UInputComponent::GetAxisValue(FName);
AMyCharacter::GetMoveUpInput();
AMyCharacter::GetMoveRightInput();
AMyCharacter::GetMoveForwardInput();
AMyCharacter::GetLookUpRateInput();
AMyCharacter::GetTurnRateInput()