4 player shared camera in BP

![alt text][1]

This is my function for keeping 4 players in bounds of the screen (notice i also put a text render to show their X and Y positions for debugging)… this in conjunction with the get actors array

which i use to keep the camera centered with the 4 players (i actually use a tracker actor attached to them so that i can have the flexibility to attach it to another actor or pawn if required)… i had to offset my camera location by -200 because of the rotation of the view, i probably could have messed with the inRange as well to achieve the same results of keeping the players bound onto the screen, but this has been my method to implement. I have not found any other solution on the internet so far… so please share if you can make it better… [also notice i am using player controller 0’s viewport, i tried using each different controllers view for the function and they always returned NULL numbers so remember to use player 0’s view just like it is in the function, and then run that function 4 times (once for each players) if it seems like it isnt working, you might have the X & Y flipped like I did during the first few tests XD …

1 Like