Something slightly wrong with code for camera zoom

I’m not sure why, but my camera which zooms out when players are a certain distance from the CenterObject (positioned between the two players) is past 300px.

But this only works when PlayerOne is on the left side of the screen and going leftward, or when PlayerTwo is on the right side and going rightward.

When PlayerOne goes to the right side of the screen (so PlayerTwo is on his left now), the camera zoom doesn’t work. I don’t understand why?

  • one distance changes camera zoom while the other distance changes camera position. That doesn’t seem right…
  • check your maths to see if they give you the expected numbers (you can store in a variable and display in a text object if you want to spare yourself a headache :grin: )