Search Unity

Question Damping speed - Framing Transposer

Discussion in 'Cinemachine' started by ihgyug, Aug 29, 2021.

  1. ihgyug

    ihgyug

    Joined:
    Aug 5, 2017
    Posts:
    194
    Hi,
    I am using a VCam with the Framing Transposer and I was wondering, is there a way to control the speed (or time) and ease algorithm in which the target returns within the dead zone?

    The effect I want to achieve is this:
    As the target moves at high speed, it goes outside the dead zone, and as soon as it stops moving or decelerate it goes fastly within the dead zone.

    What I have right now is that if I decrease the damping the target will never leave the dead zone, if I increase it, the time to get back to the dead zone is extremely high.

    Thanks
     
  2. gaborkb

    gaborkb

    Unity Technologies

    Joined:
    Nov 7, 2019
    Posts:
    856
    This sounds like Soft Zone (it is below Dead Zone). Have you tried using that instead of the Dead Zone?
     
  3. ihgyug

    ihgyug

    Joined:
    Aug 5, 2017
    Posts:
    194
    The current scenario on my end is as such:
    If I set the Damp too small, the target is never going to leave the Dead Zone (or you can word it as stepping in the Soft Zone, same thing).
    It doesn't matter if the Dead Zone size is 0 (it will consider the center point).

    If I set the Damp too high, the target is able to navigate the Soft Zone but as it stops moving, it takes an absurd amount of time for the camera to focus it back within the Dead Zone and there is no control over it (at least not in the publicly available properties of the Framing Transposer).

    I can't get the described effect, where the target is able to get far into the Soft Zone as it moves, and once he stops moving, the camera focuses back to the target within the Dead Zone in a faster way.
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    The X/Y/Z Damping settings in the FramingTransposer control how fast the camera recenters itself. The value is the approximate number of seconds it should take.

    upload_2021-9-3_9-16-13.png

    However, that recentering is always happening, so unless the character moves very quickly it will not necessarily reach the edge of the soft zone because the camera will catch up to it.

    What behaviour exactly are you looking for? It sounds like you only want recentering to happen when the player is not moving. If that's the case, you might consider writing a custom script that dynamically adjusts the vcam's damping parameters as a function of character movement.