How do I smooth out camera movement with multiple ScrollTo behaviors?

0 favourites
  • 2 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.
  • Hello,

    I just discovered by accident that if you have more than one object with the ScrollTo behavior enabled, the camera will scroll to the point between all objects, and that's really really cool. For example, the camera object follows the player object with a lerp, and once an enemy gets close enough and is the current target of the player, I enable the enemy's ScrollTo behavior and the camera will move to the point between the two. And what's cooler, if I add a camera anchor" to the layout, the camera will follow the point between the 3, so the camera follows the action but never strays away from the area. My issue is that the camera snaps instantly to that point once those extra ScrollTo behaviors are enabled, instead of moving smoothly.

    Is there a way to smooth out that snapping while using multiple ScrollTo behaviors? Or do I have to ditch this approach and calculate the point between all objects myself?

    Thanks.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For each new scrollto object/instance you add, spawn or create it at the current viewport center, and tween or lerp it to the destination point. You can use an invisible helper sprite(s) and pin to the destination object after it reaches the destination.

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