How do I make camera follow only vertically ?

0 favourites
  • 6 posts
From the Asset Store
Simple and easily editable template for a dynamic camera that zooms in and out based on how far apart the players are.
  • Hi All,

    How can i set the camera to follow the player only vertically?

  • Get rid of any Scrollto behaviors.

    System set scrolly to lerp(scrolly,player.y,yourspeed*dt)

  • Get rid of any Scrollto behaviors.

    System set scrolly to lerp(scrolly,player.y,yourspeed*dt)

    Can you explain a bit more, please? There is no scroll to in system unless there is a scroll to on some object that I can unable.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Scrollto is a behavior. You should know if you added it.

    If it doesn't scroll to the camera's x axis, then don't worry about it.

    Otherwise look under the system object to get to the action to scroll y.

  • Scrollto is a behavior. You should know if you added it.

    If it doesn't scroll to the camera's x axis, then don't worry about it.

    Otherwise look under the system object to get to the action to scroll y.

    Ok, I got it, kind works. The only problem now I have that the camera positioning everything to the middle of the screen.

    I am using this: lerp(scrolly, player2.Y, dt)

    So everything is now shifted up by default. Is there a way to make it more static and move it only with the jump?

  • lerp(scrolly,player.y,yourspeed*dt)

    yourspeed is the speed you want it to scroll times dt

    The no lerp version is set scrolly to player.y

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)