I’m new to unity, and trying to make it so that the camera scrolls along and a child of the camera are some hitboxes that will prevent the object leaving. The player has a rigidbody2D (0 gravity with rotation locked) and an edge collider2D but whenever it touches the walls (which are moving sideways and are made of boxcollider 2Ds) it flies off the screen. How do I make it touch the wall without flying off?
It only seems to slide out on this area, nowhere else. The friction value on the wall is 100000000000.