Me and a friend’s recently decided to try and make a top-down shooter, and as such I have been working on the camera a bit. My goal is to achieve camera behavior similar to that of Alien Swarm where the camera’s focus is mainly the character, but also follows the cursor around a bit so the player can look a bit further away*(see this video for a quick example)*.
I managed to sort of get a similar behavior but it was rather buggy and I decided to scrap it as I try to think of a better way to do it. So currently I have a very basic setup using Get Mouse Position Scaled by DPI and clamping the X and Y values. So if anyone has any suggestions as to how to get behavior similar to that game, I’d greatly appreciate it!
However, there are 2 other issues I have which I just can’t seem to find a way to fix;
1. Camera is Very Twitchy
I am using Get Hit Result Under Cursor Channel’s location output in order to have my character face towards the Cursor, and while this works most of the time, there are areas where the camera will get very twitchy for example when the cursor is on top of a wall and the such. I still have to find a nice way to prevent this from happening.
Would the best way be to just make an array of all the actors it should ignore? Or would there be a better way to do it?
2. Weird Camera Behavior in Multiplayer
My character’s movement is nicely replicated, however there’s something going on with the client where it still seems to be affected by the Server’s camera or something. I’m not even sure how to describe it, so I recorded a video of it instead. My assumption is that it’s due to me using Get Player Controller which is set to Player Index 0.
Here’s a video I recorded showcasing both of my issues;