When you are hooked to a pole i want the camera to move left and right, but when you aren't hooked to a pole i don't want the camera to move left. What hooked means isn't really important, but what you need to understand is when you're not hooked you can only go in one direction. So i figured since you can only go in one direction and i want the camera to not move left when you're not hooked, i would just reset the limit whenever you become unhooked. Here is what i did:
if $Camera.limit_left < position.x + $Camera.offset.x:
$Camera.limit_left = position.x + $Camera.offset.x
The camera follows the player with an offset of -330 pixels (which is why i add), and doesn't move up or down. The problem is that for some weird reason the camera seems to jump a little bit when i reset it and i don't know why. Can anyone help? There isn't any smoothing or anything.