Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Cinemachine for 2D game

Discussion in 'Cinemachine' started by IgorDemchuk, Jul 23, 2017.

  1. IgorDemchuk

    IgorDemchuk

    Joined:
    Mar 9, 2015
    Posts:
    21
    I tried Cinemachine and it works like a magic for 3D games! Awesome!

    But for my 2D game it is not suitable out of the box.
    In my game I need orthographic camera to not follow player on X axis, but to follow him on Y axis, but only on the way up, when the player is around the center of the shot, and if the player goes down the Y axis, camera shouldn't follow him (see attachment below).
    I couldn't done it out of the box. Or I couldn't find a reasonably easy way to do it.

    I think Cinemachine lacks a thing essential for almost any 2D game - Dead Zone Width and Dead Zone Height for Body.


    23-07-2017-13-37-17.gif
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    Thanks for the post! I think you might be right. I'll add this to our queue.
     
    Last edited: Jul 25, 2017
    IgorDemchuk likes this.
  3. salmelo

    salmelo

    Joined:
    Nov 25, 2014
    Posts:
    4
    I'd just like to second this. Adding a dead zone (and the opposite, I'm not sure what you'd call it but a distance beyond which damping is ignored to guarantee the character stays on screen even when moving quickly, what I think the red zones on the Composer are?) to the basic Transposer would be a huge boon for 2D games, especially platformers.
     
    Alverik and IgorDemchuk like this.
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658