Hi, I'm currently developing a 2D side-scrolling platformer game using SFML. How do I stop the camera from moving when it reaches the edges of the level ?
if right edge of camera > right edge of level
move camera so that right edge of camera = right edge of level
if you have some kind of variable determining the horizontal camera speed you could set that speed to zero here.