I’ve created a blueprint logic to control RTS style camera. Almost everything works except one annoying thing - when I trigger a function to scroll my view across the map using Mouse X and Y events, both of the events seem to repeat at a different rate, resulting in vertical view scroll speed being half of what horizontal speed is. What is more curious is that it doesn’t happen when I trigger the same function using WASD keys.
This is what my blueprint to trigger view scrolling using cursor proximity to screen edge looks like:
This blueprint then proceeds to this function:
It may look slightly messy due to the noodlework required to limit the camera pawn going out of the bounds of map, but other than that it’s pretty simple. Basically, things outside the function will set the values of View Move X and Y variables, and then call this function, which uses values supplied by those variables to move the camera pawn.
In case of WASD keys it works, but in case of Mouse input on the first picture, when triggering horizontal scroll using Mouse X event, every third tick seems to be skipped as seen on the print string:
Does any blueprint expert know what could cause this and what the possible solutions or workarounds are? I fail to see any reason it should behave this way, but I am sure I am missing something.
Thank you in advance