so the constrain settings shown in the screenshot ensure that the camera doesn't show any art outside the scene, but i still want the player to be centre at all times, how would i achieve that? (I have no background constraint in the field o the camera?)
Having the player be centrered and adding a constraint are both concepts that compete for control over the camera's position. As you near the screen edge, the camera can no longer be centered on the player because you're limiting how far the camera can move.
The only way to have the player be centered at all times, without showing the art outside the scene, would be to limit the player character so that they cannot step so far to the edge of the scene that the outside art becomes visible.
Comments
It depends on what camera you're using.
If a GameCamera2D, set its Track freedom and Follow speed values to zero to keep its target in a fixed on-screen position.
Ok, so see screenshot to see player not in centre but Track Freedom and follow speed values at 0
https://www.dropbox.com/s/hyopfare13e95x3/Screenshot 2021-10-12 at 11.14.32.png?dl=0
The camera's motion is still bound by the background constraint you've assigned.
so the constrain settings shown in the screenshot ensure that the camera doesn't show any art outside the scene, but i still want the player to be centre at all times, how would i achieve that? (I have no background constraint in the field o the camera?)
https://www.dropbox.com/s/lizv3xcx4gqd98h/playercentreofcamrea.png?dl=0
Having the player be centrered and adding a constraint are both concepts that compete for control over the camera's position. As you near the screen edge, the camera can no longer be centered on the player because you're limiting how far the camera can move.
The only way to have the player be centered at all times, without showing the art outside the scene, would be to limit the player character so that they cannot step so far to the edge of the scene that the outside art becomes visible.
OK got it, thanks!