Zone Based Camera movement + screenshake? Any good methods to do this

0 favourites
  • 4 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, I'm thinking of switching my camera from a free roaming camera with scrollto behaviour to zone based - I really like how the zone based camera works in this tutorial (which also has .capx example):

    Because I was using a free roaming camera before I was able to attach a scrollto behaviour to it and use the 'shake' setting to call screenshakes - but this won't work if I use the zone based method as the camera is locked based on player position. If I add another object with scrollto behaviour on it, so that I can call the shake, the focus then shifts to that object, which I don't want. I need a way to be able to call a nice looking screenshake, but also be able to keep the camera pretty much locked to the zone I'm in.

    The only way I can think to do it is to put the zone based camera movement into a group and temporarily disable it when I call a manual screenshake - move the scrollx and scrolly parameters around a bit - before re-enabling the zone based camera and it will lock back in - but I'm having trouble getting a nice screenshake this way, the inbuilt one on the scrollto behaviour looks much better.

    I've got unbounded scrolling on, but I don't seem to be getting very far. Has anyone tackled anything similar to this?

    Thanks for any suggestions :)

  • You can place invisible sprite objects at the zones you want to focus on... then create another sprite called 'camera' and give it a ScrollTo Behaviour.

    Then you test when the player is inside one of those zones and set the camera object to the middle of that zone. It's even greater, because you can do good transitions with lerp and all that stuff.

    For camera shaking, you can use the "Shake" action from the ScrollTo behaviour on the camera sprite.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the suggestions. Magicam looks great, but a bit worried about using a behaviour that no longer seems to be supported - and is labelled as alpha. It looks solid though - is it pretty reliable? I remember it being around for Construct Classic.

    I ended up ditching the scrollto method used in the tutorial I linked. Put my lookahead camera back in and locked it to half a screen width away from the ends of each zone the player is overlapping - so it lerps a bit in front of the player if they are more than 320 pixels over from the left hand side and less than 320 pixels in from the right and it's working an absolute treat!

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