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

Change Interpolation in specific directions

Discussion in 'Cinemachine' started by ZigZagZat, Apr 17, 2021.

  1. ZigZagZat

    ZigZagZat

    Joined:
    Mar 6, 2021
    Posts:
    12
    I would like to have a smooth interpolation when the camera moves up (like when the player jumps), but a much lower level of interpolation when it is moving down (like when the player is falling). I know I can change damping in the X and Y, but can I change it based on the direction of Y?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,141
    There is no out-of-the-box way to have the vcam do asymmetric damping on an axis.

    The easiest way to introduce such nonstandard things is to make a "shadow" target for the player and use that as a target for the vcam. The shadow target has a custom script on it that matches the player's position and rotation, plus any custom differences you would like to implement (such as lag based on direction of movement).