Search Unity

Cinemachine camera not alligned with horizon in startup

Discussion in 'Cinemachine' started by Pourya-MDP, Nov 22, 2020.

  1. Pourya-MDP

    Pourya-MDP

    Joined:
    May 18, 2017
    Posts:
    145
    Hey there every one
    After updating my cinemachine theres a wiered behaviour in my camera

    You can see what a perfect alligned shots looks like in this picture

    Screenshot_20201122-105618_Convey The Ball.jpg

    But now the problem is like this

    Screenshot_20201122-105548_Convey The Ball 2018.jpg

    Its happening for random on game startup i think its something with the y value in cinemachine but didnt figure it out how to solve this
    Im using freelook camera and set all three rig heights same 1.25
    Any help will be appreciated
    Thanks
     
    Last edited: Nov 22, 2020
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,724
    Can you show the inspector for your FreeLook?
    (why are you using FreeLook with 3 rigs the same? It's complicated for nothing)
     
  3. Pourya-MDP

    Pourya-MDP

    Joined:
    May 18, 2017
    Posts:
    145
    Cinemachine.png
    Hey
    Heres my inspector and also i didnt found any setting for maybe having a single rig?
    Theres always 3 and i dont want the y value at all so made all 3 height the same
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,724
    It's because you're using BindingMode LockToTargetOnAssign. Try LockToTargetWithWorldUp.

    Try replacing your FreeLook with a simple vcam set up like this:

    upload_2020-11-23_11-41-2.png

    This will allow you to orbit the target with mouse X movement, using a single orbit height.
     
  5. Pourya-MDP

    Pourya-MDP

    Joined:
    May 18, 2017
    Posts:
    145
    Thank you
    Will try these
     
  6. Pourya-MDP

    Pourya-MDP

    Joined:
    May 18, 2017
    Posts:
    145
    Ok now the problem is i coded freelook to use my joystick as input but now in a generic type of virtual camera theres no m_Xaxis.value
    So how am i suppose to control this value in cinemachinevirtualcamera now
     
  7. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,724
    gaborkb and Pourya-MDP like this.