Why my code doesn’t work?
When I press right key my object goes to the right and stops in the middle of the scene.
If I keep pressing a lot of times the right key it continues going to the right but the camera
doesn’t follow it.
The cam will follow your object till it’s bounds reach 800 in x
Since your zoom is x2 the cam boarders should be 400 px wide
This means the cam will follow your object till 600px in x (800-400/2 =600)
Place an object at 799x and you see that the cam stops at that object. (1px visible)
haha! I know what happened. Actually it’s working fine. I was confuse because I had nothing else on screen but my moving object. It gives me the sensation my object get stuck in the middle of the scene. You are correct as always! Thanks friend.