TWO PLAYER TOP DOWN - STOP PLAYERS RUNNING OFF SCREEN

Wouldn’t it be easier to attach two Collision components(box) to the Camera component. These invisible walls will always follow the camera. To position them accordingly to Viewport size just Get Viewport Size node / 2 = X. One wall will be at Camera location(x-axis) - X and the other Camera Location(x-axis) + X. Maybe I’ll test it out later for you.

You could set these walls to only block the players and nothing else.

Oh I was thinking of a 2d side scroller, my bad :stuck_out_tongue: Well I think It could still work though you would add two more walls on the y axis.

2 Likes