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

(Platformer 2D) Aim - Same as Follow Target with Dead Zone ?

Discussion in 'Cinemachine' started by RemDust, Jun 10, 2020.

  1. RemDust

    RemDust

    Joined:
    Aug 28, 2015
    Posts:
    431
    Hello there !
    I'm trying to fine tune my camera control for my action platformer 2D :
    Here is my setup :

    - The "camera target group" is made of the player object (himself) and a player child object that can move around the player to move the camera around (like checking platform underneath player or look up)
    - Follow : the target group
    - Look At : the target group
    - Body : transposer
    - Binding Mode : Lock to Target with World Up
    - Aim : Same as Follow Target with damping

    It works pretty good so far but I'd like to have a DEADZONE so the camera doesn't follow the player on the Y axis immediately (a sort of threshold). I kinda think it's available in Aim - Group Composer but if I try to use it the camera doesn't stay in the right plane and breaks the 2D (rotations appear in X and Y of its transform)... I don't know how to tackle this...

    What would be the correct setup for this ?

    Thank you so much for this awesome cinemachine features ! :D
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    Use these components:
    Body: Framing Transposer (has group framing options and dead zone)
    Aim: Do Nothing
     
    RemDust likes this.