Help with the camera

Hi, I need help.
I added a trampoline, but I need that when I jump on the trampoline, the camera follows the player at that moment, but when I get off the platform, the camera returns to the normal position.

Hi @elder021,

You can use either ‘Center the camera on an object’ or ‘Center the camera on an object within limits’ in the action section of the events tab. If the above one doesn’t solve your problem and if you are looking for something else, please let me know where I am getting it wrong.

I think I know a way to do this; it’s probably not the best nor the right away, but here it goes!

If by “normal position” you mean you want the camera to be back to its original position - without having it “following the sprite” - maybe you could use a variable to tell when to make the camera follow the player and when to send it back to its normal position? Something like:

If scene variable "CamTrampoline" = 0
  do = SceneWindowWidth() / 2 to X position of camera (layer: "")
  do = SceneWindowHeight() / 2 to Y position of camera (layer: "")

( This above would center the camera on the screen. Feel free to change the expression to be an specific position. )

If scene variable "CamTrampoline" = 1
  center camera on "Player" (layer: "")

( This above would center the camera on the Player as they jump. )

And just set the variable to = 1 when the Player is on the trampoline and = 0 when the player is off the trampoline. ^^; And there are other ways to make this happen more smoothly too.

I hope this helps!