Search Unity

cinemachine 2d setup

Discussion in '2D' started by VP_no1, Dec 1, 2021.

Thread Status:
Not open for further replies.
  1. VP_no1

    VP_no1

    Joined:
    May 12, 2018
    Posts:
    132
    Hi.

    I would like to achieve with C2d ortographic the following:

    1. be able to fix the camera while i am hitting a collider (so that i will not see empty screen)
    2. have some special points to zoom in and out when triggered
    (i am in a platformer)

    for 1
    I am thinking to have 4 empty GO with colliders on the player on each direction.
    When they hit any collider (the margins of the sprites) the camera will stay fixed on y and/or x until the collider(s) do not hit.
    How do I achieve this ? Is it a better way ? I can go with scripting too if there is a bettter way.
    (Another option I am thinking to is to have a big triggered collider that covers 80% of the camera view and use it as a trigger for fixing the camera)

    for 2
    I need to have different cameras or I just need to have some trigger spots and when my follow GO (or there might be 4 as I said on 1) to manipulate the lens ortho size of my only camera ?

    thank you in advance for any idea
     
    Last edited: Dec 1, 2021
  2. VP_no1

    VP_no1

    Joined:
    May 12, 2018
    Posts:
    132
    point 1 solved with Cinemachine Confiner 2D
     
  3. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,492
    The 2D team do not deal with this feature, the Cinemachine team do. For the future, you can find the Cinemachine forum here.
     
    VP_no1 likes this.
  4. VP_no1

    VP_no1

    Joined:
    May 12, 2018
    Posts:
    132
    posted in cinemachine ty :)
    this thread can be closed
     
    MelvMay likes this.
Thread Status:
Not open for further replies.