Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Blending position and rotation simultaneously

Discussion in 'Cinemachine' started by MSachs, Oct 10, 2018.

  1. MSachs

    MSachs

    Joined:
    Nov 22, 2017
    Posts:
    101
    Hi,

    I have a FreeLook Camera and a regular Virtual Camera in my scene. The Virtual Camera acts as a top down camera to show my room as a map. The problem is when blending from my freelook to my vcam it is blending the position first and then it is blending the rotation. The other way round it is blending the rotation first and then the position.

    Is there a way the blend the rotation while blending the position so it gives a smoother experience?

    Here is a short video to exactly show what I mean:


    thanks in advance :)
     
  2. MSachs

    MSachs

    Joined:
    Nov 22, 2017
    Posts:
    101
    Any ideas?
     
  3. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    2,472
    The problem you're having is gimbal-lock. This occurs when a camera is looking straight up or straight down. You can mitigate it considerably by not having the top camera look straight down, but instead give it a small angle, say 88 degrees instead of 90. What happens if you try that?
     
    MSachs likes this.
  4. MSachs

    MSachs

    Joined:
    Nov 22, 2017
    Posts:
    101
    Ah that's probably what it was about when I read somewhere VCams don't like looking straight up or down :D
    Was able to reduce the angle even down to 80 degrees which fixed it perfectly! Thanks a lot :)
     
    Gregoryl likes this.