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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Axid cotnrol not updating when camera isnt prioritized

Discussion in 'Cinemachine' started by FakeBocha, Apr 7, 2020.

  1. FakeBocha

    FakeBocha

    Joined:
    Aug 8, 2017
    Posts:
    23
    I'm using 2 free look cameras (one for normal view and the second for aiming) and for some reason when I enable the aim camera I see that it didn't change its rotation by the mouse movement - it stayed the same as it were in the beginning.

    So my question is -0 is there a way to make the axis control values update according to the current rotation? or even better - make the not prioritized camera update herself all the time?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,268
    Have you tried checking the Inherit Position option on the FreeLooks?

    upload_2020-4-8_7-58-5.png
     
  3. FakeBocha

    FakeBocha

    Joined:
    Aug 8, 2017
    Posts:
    23
    I did, but because the two cameras ahs different properties when I transition between them the camera pops to a new position and wont aim at the same direction.
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,268
    Can you show some images? What are the different properties?
     
  5. FakeBocha

    FakeBocha

    Joined:
    Aug 8, 2017
    Posts:
    23
    Mid and bottom rigs difference are the same as the top ones.
    The target look at and follow is the same target (the player)
     

    Attached Files:

  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,268
    I think your problem is that your follow target is at the feet of the player, but you are looking near the head.

    Can you try giving the player an invisible child, somewhere near the head, and use that as a LookAt and Follow target, with no Y offset? Then the axis value might transfer properly with InheritPosition. Note that you will need to adjust your orbit heights to compensate for this change.
     
  7. FakeBocha

    FakeBocha

    Joined:
    Aug 8, 2017
    Posts:
    23
    I


    It focuses correctly but when I let go of the aim button it changes direction for some reason.
     
  8. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,268
    Do you have InheritPosition set on both FreeLooks?
     
  9. FakeBocha

    FakeBocha

    Joined:
    Aug 8, 2017
    Posts:
    23
    Yes
     
  10. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,268
    Is recentering enabled? If so, disable it
     
  11. FakeBocha

    FakeBocha

    Joined:
    Aug 8, 2017
    Posts:
    23
    Disabled
     
  12. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,268
    Can you try changing the FreeLook Binding Mode (on both FreeLooks) to LockToTarget? I don't know why you have it set to LockToTargetOnAssign. Does that help?
     
  13. FakeBocha

    FakeBocha

    Joined:
    Aug 8, 2017
    Posts:
    23
    Its LockToTargetOnAssign for a reason - but still - when I change it doesn't fix it
     
  14. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,268
    I'm running out of ideas. I see no obvious reason why the angle changes. Can you put together a lightweight demo project that reproduces this and PM it to me?
     
  15. FakeBocha

    FakeBocha

    Joined:
    Aug 8, 2017
    Posts:
    23
    On it.
    Thanks for all the help!! I really appreciate it.