im trying to achieve a system similar to the alternate controls in Resident Evil 1 remake, where the character moves relative to the camera instead of tank controls.
i was able to make a workaround with this BP
and the camera relative movement worked, however, i also want the player’s input to still continue even after a camera transition as long as the player holds the input, just like in resident evil 1, for example
here im holding down right input to go to the right side relative to the camera, but after the camera transitions, the controls invert and it creates a jarring situation where instead of continuing forward, they go backwards as soon as the camera transitions. how can i go about fixing this?
depending on how strict you want this to be (the let go system)
you can store a transform of the Camera’s current transform StoredCameraTransform in the “Started” Exec Pin, then it would join up with the “Triggered” Exec pin
in the Triggered use that StoredCameraTransform to modify the Pawns location instead of the CurrentCameraLocation
out of the Completed and Canceled Exec Pins (these are for the Analog input returning to neutral if there is any input on any axis “Triggered” will fire instead) you would clear the StoredCameraTranform
if you want it to swap perspective input at a certain change in the input, then you would also store the value of the analog input as well then compare against that to see if the new input is “different enough” to the stored input to replace it, and use something else.