Search Unity

Unwanted Y axis damptime during jumps

Discussion in 'Cinemachine' started by rd1349, Nov 12, 2019.

  1. rd1349

    rd1349

    Joined:
    Apr 25, 2017
    Posts:
    30
    So I decided to try out cinemachine yesterday and figured it would be an excellent time to explore three dimensions instead of my usual two.

    I got my player objects movement, rotation and jump working but I have a persistant issue that I can't figure out how to get rid of. When the player jumps the camera does not maintain level height with the player, it drags behind in a sort of wave-like motion as if it were damped. Naturally this makes the camera highly unstable and would make it impossible to orient the camera in the desired direction.

    I was hoping someone could point out to me how to fix this. I'm sure cinemachine must have something to prevent this but try as I might I have been unable to find a solution.

    Thank you very much for any replies.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    It would help to know a little more about the kind of camera you are making. Can you post the vcam's inspector?
     
  3. rd1349

    rd1349

    Joined:
    Apr 25, 2017
    Posts:
    30
    Sorry it's a freecam for a 3rd person style setup.

    Either way here's the inspector.

    Thanks for the timely reply

    upload_2019-11-12_21-24-37.png

    upload_2019-11-12_21-25-20.png

    upload_2019-11-12_21-25-48.png

    upload_2019-11-12_21-26-9.png
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    Thank you. The Y damping in all 3 rigs is controlling the lag along the Y axis. Units are in seconds. 1 means 1 second to catch up. Set it to 0 (in all 3 rigs) for no lag.

    That controls the camera position lag relative to the target. There is also LookAt lag, controlled by the Horizontal/Vertical damping in composer.
     
  5. rd1349

    rd1349

    Joined:
    Apr 25, 2017
    Posts:
    30
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    Maybe we should step back a little and discuss the exact camera behaviour you're looking for.

    Do you want the character to remain rigidly fixed in the frame, with the camera tracking him exactly, as if attached by a rigid rod? If not, can you please describe the behaviour you want to achieve?
     
  7. rd1349

    rd1349

    Joined:
    Apr 25, 2017
    Posts:
    30
    I don't necessarily want the camera to be rigid overall but yes within the y axis I want the camera to stay relatively stable as possible. More or less along the lines of a classic third person shooter for now.

    I think this segment of this video serves as a good example.


    the character while moving along the y axis is kept more or less centered.
     
  8. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    I suggest that you start by setting all damping values in all rigs to zero and feel that out for a while. Then, increase them a bit along the axes where you want some give. OrbitalTransposer damping controls the lag of the camera position, Composer damping controls the lag of the camera rotation.
     
  9. rd1349

    rd1349

    Joined:
    Apr 25, 2017
    Posts:
    30
    Thanks man, just tested it. It was the orbital transposer after all. Don't know if you had any role in development but my congratulations to you and the unity team for this great package. And thank you for the attentive replies.
     
    Gregoryl likes this.