Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

cinemachine free look distance between target

Discussion in 'Cinemachine' started by rino3390, Jan 30, 2020.

  1. rino3390

    rino3390

    Joined:
    Nov 15, 2018
    Posts:
    4
    I use the cinemachine free look for 3rd person controller, and there's a little problem that when the target move too fast it will be too close to the camera like picture.
    upload_2020-1-31_4-32-57.png

    And it will turn back to the center when stop moving.
    upload_2020-1-31_4-34-0.png

    I would want to know how to keep the character in the center.I try to add follow zoom or dead zone but either work.

    Sorry for the poor English,but I really have no idea to with it.
    Hope for helping, thank you.
     

    Attached Files:

  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,234
    Lower the damping, make the distance more constant.
    You can add a script to scale the damping down as the speed increases.
     
    Irgi and brandonschlosser101 like this.
  3. rino3390

    rino3390

    Joined:
    Nov 15, 2018
    Posts:
    4
    Thanks for the reply.
    I have tried to change the damping (which in follow zoom and Horizontal and Vertical in Rig) but it seems nothing change....
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,234
    Not there. Change it in the Orbital Transposer, in all 3 rigs.
     
    Irgi and Omelette_au_Goulage like this.
  5. brandonschlosser101

    brandonschlosser101

    Joined:
    Apr 19, 2018
    Posts:
    15
    Thank you so much! I've been fiddling with the settings for hours trying to get the zoom on acceleration effect to stop.
    Phew!
     
  6. fantekvelik

    fantekvelik

    Joined:
    Sep 27, 2020
    Posts:
    5
    I am a bit late buuut...
    @Gregoryl I have similar issue. When my car (player) gets up to speed (like 180km/h) the camera is so far away that i can barely see the player. but I cant find the damping function in the CinemachineFreeLook component. Using unity 2020.3 LTS. Thanks in advance
     
  7. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,234
    It's not in the CinemachineFreeLook component, it's in the CinemachineOrbitalTranspposer component.

    upload_2022-1-27_12-16-55.png

    You'll have to change it in each of the 3 rigs. You can do something like this:
    Code (CSharp):
    1. CinemachineFreeLook freLook = [...]
    2. for (int i = 0; i < 3; ++i)
    3. {
    4.     var rig = freeLook.GetRig(i);
    5.     var orbital = rig.GetCinemachineComponent<CinemachineOrbitalTransposer>();
    6.     orbital.m_ZDamping = blablabla
    7. }