CanvasLayers make things inside them to render independent from camera, but this doesn’t seem apply to physics. I would advise to prefer CanvasLayer only for GUI, and put camera and world objects outside of them.
So how do you think I could do the barriers around the game the easiest?
brikica | 2019-09-18 10:49
I made a simple infinite game.
I’m trying to close off the game on either side so that the player can’t escape the screen.
So your game isn’t infinite? I don’t understand… what do you want to do?
If you want the camera to stay centered on the character, make it child of it or align it with a script.
If you want the game world to have finite barriers, don’t use CanvasLayer, just drop some colliders on the edges.
In any case I would not recommended to use CanvasLayer for objects that move inside the game world, this node is mainly useful for entirely separate things such as GUI and special situations depending on the type of game.