Search Unity

Benefit of Cinemachine in my case

Discussion in 'Cinemachine' started by TylerCode_, Apr 20, 2020.

  1. TylerCode_

    TylerCode_

    Joined:
    Sep 8, 2010
    Posts:
    221
    I want to look into Cinemachine but want to know if Cinemachine is going to be worth learning to put in my project. I'm working on a (local) Multiplayer, Top-Down RPG. I want to have a camera that zooms out to get all players in view, then splits when they get past a certain distance. This is going to be a little bit of a pain with code to get polished up etc but I want to know if anyone who knows their way around Cinemachine would think that it's worth just doing that in Cinemachine. I'm looking at it to lower the effort level but also I want to learn Cinamachine so that alone counts for something.
     
  2. gaborkb

    gaborkb

    Unity Technologies

    Joined:
    Nov 7, 2019
    Posts:
    856
    You can very easily achieve this in Cinemachine. TargetGroup is just for this. You add your targets (players) to the target group, and CM will take care of the zoom in/out part to make sure they are all visible at the same time.

    This one you would have to script, but it sounds simple enough.

    For example, you could have one vcam that tracks the target group, and one vcam for each player. Depending on player distances, you either active your TargetGroup vcam or your individual player vcams.

    If you have any questions, let us know, and we will gladly help you out ;)

    Also note:
    When you get the Cinemachine package, you can get our example package, which contains a lot of useful examples, including ones with target groups (see the attached screenshot).
     

    Attached Files:

    TylerCode_ likes this.
  3. TylerCode_

    TylerCode_

    Joined:
    Sep 8, 2010
    Posts:
    221
    Thanks for this, I don't mind doing it all from script so being able to do half of it with Cinemachine (and the half I was dreading at that) gets me sold.

    Thanks again.
     
    marc_tanenbaum and gaborkb like this.
  4. Xhitman

    Xhitman

    Joined:
    Oct 30, 2015
    Posts:
    452
    Cinemachine is very powerful. I just delete my old camera script when I start to use cinemachine.

    But it is very difficult to master, we do not learn much from the basic example. Some advanced example or video to show how different combination could be made would be helpful.
     
    TylerCode_ likes this.
  5. jamespaterson

    jamespaterson

    Joined:
    Jun 19, 2018
    Posts:
    401
    +1 cinemachine
     
    TylerCode_ likes this.