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

Cylindrical blending problem

Discussion in 'Cinemachine' started by DaniP_, Sep 25, 2020.

  1. DaniP_

    DaniP_

    Joined:
    Feb 9, 2015
    Posts:
    4
    Hi,

    I have two virtual cameras with different behaviours, the first one is fixed behind the player and uses this config:

    upload_2020-9-25_9-10-38.png

    The other virtual camera rotates around the player and uses this config:

    upload_2020-9-25_9-12-33.png
    *Both virtual cameras have the same "LookAt" and "Follow" assigned, and all of them is the same transform.

    Basically, I'm using the world space virtual camera and, if I move the right joystick, camera blends to the Simple Follow With World Up virtual camera. If I'm not moving the right joystick, camera blends to the previous one (world space) and the problem comes when the blending is more than 180º. It seems than the camera try to adjust its movement to complete the blend. In the next video you could see better this (from second 26 in the video you could see the problem).

    Link to video here.

    Is there any way to fix this, what can I do to avoid this?

    Thank you!
     
  2. DaniP_

    DaniP_

    Joined:
    Feb 9, 2015
    Posts:
    4
  3. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,233
    This is not so easy to fix with the setup you have. Perhaps we can look at changing your vcam rig.

    As far as I can tell, you are using a second vcam to implement camera recentering. Why don't you use a single vcam, and enable recentering?
     
  4. DanielP_

    DanielP_

    Joined:
    Jun 4, 2019
    Posts:
    16
    Because the cameras haven't the same behaviour, the first one is always behind the character and the second one, once you move the right joystick, rotates around the character using the specific camera settings so that's the problem for us. Besides, in other parts of the game, the first camera has different settings and moving the right joystick we change to the second camera until user releases the joystick and we comeback to the first camera.
     
  5. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,233
    If you really need to use two vcams, then the way to make the pop go away would be to to recenter the second vcam when the user lets go of the joystick, so that it orbits around to the same position as the first vcam, at the same time as the blend is happening.
     
  6. DanielP_

    DanielP_

    Joined:
    Jun 4, 2019
    Posts:
    16
    Sorry for the delay in my response and thank you for your suggestion. The recenter you proposed doesn't work but it gave me the solution. Finally, I simulated the blinding between cameras by myself calculating the angle between the two cameras and moving the camera with a lerp.

    Thank you!! :)