Hello!
I’m making 2D multiplayer game and I currently have the game mechanics and client-server structure. Everything works just fine, I’m synchronising position, rotation and it’s perfect. The thing is that when I test it I have two different windows on left and right side of the monitor (client/server) and one of them is always not active (I “play” only on client for example and look what’s going on on both) but the cursor position is always being read on both of them.
I’m looking for function that would block this behaviour. Something like:
if (windowIsActive) → rotateTowardsMouse.
Thanks for any help!