Search Unity

Bug freelook camera interpolates between orbits counter intuitive

Discussion in 'Cinemachine' started by laurentlavigne, Oct 12, 2022.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,327
    what's expected is that Y will linearly interpolates within the heights*radius field
    instead what we get is a linear interpolation between the rigs
    so if a rig is way higher than the previous one, there will be a massive jump in speed of the camera
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    That is the expected behaviour, it is not a bug.

    FreeLook might not be the best CM rig for your needs. Can you post an image or video showing the sort of camera behaviour you are looking for?
     
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,327
    your usual orbital third person camera: 2 axis of control, movement should be predictable
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    Well, it's a byproduct of the three-ring setup when the middle ring is the centered state. We can't cotrrol how you space your orbits.

    Instead of the FreeLook, you can try using a regular vcam with FramingTransposer in Body and POV in Aim. That will give you a 2-axis orbital camera that is completely symmetrical.
     
  5. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,327
    I tried that first but couldn't find the fields to type in the name of the X,Y mouse input.
     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    It's inside the POV, hard to miss
     
  7. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,327
    still can't find it, can you show me in a screencapture?

    POV?
    upload_2022-10-12_10-57-42.png
     
  8. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    You forgot to put FramingTransposer in Body and POV in Aim.

    upload_2022-10-12_14-1-44.png
     
  9. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,327
    Gocha, I'll try.
    This moves much more naturally although it loses the nice control so I'll take it for a spin, thanks.
    I noticed that the up vector doesn't match and there is no similar option to bind it, is this where I must use the world up override in the CinemachineBrain?
     
  10. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    Actually this setup probably won't work so easily for your use-case (because of the travelling Up problem). Sorry to mislead you. Instead, you can keep the FreeLook, but space the orbit heights evenly.
     
  11. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,327
    the problem with the 3 orbits is that some times the camera goes on the other side of the orbit, maybe the piece of code is wrong?
    Code (CSharp):
    1.                 var positionNearFollowCamOrbit = TARGET.position + (transform.position - TARGET.position).normalized * followVCAM.m_Orbits[1].m_Radius;
    2.                 followVCAM.ForceCameraPosition(positionNearFollowCamOrbit, spaceVCAM.transform.rotation);
    using a vcam worked because i assigned target to the override up vector of the cine brain, but it ignores collisions and has a hiccup