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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Question Transitioning from VCam to FreeLook sometimes shakes randomly

Discussion in 'Cinemachine' started by LukasBigitec, May 6, 2021.

  1. LukasBigitec

    LukasBigitec

    Joined:
    Aug 19, 2020
    Posts:
    8
    For some reason when transition from and to the FreeLook camera weird rotation jitters happen, they are sort of reproducible but sometimes they don't happen at all in the same circumstances.

    I'll attach a video and the two components this specific instance is happening, but in my project, it happens nearly everywhere at random, but only with the FreeLook camera.

    Reference Camera Movement Footage:
    https://drive.google.com/file/d/1nScEpkFUD1unCJodpnVrp-uMCvaS4OTG/view?usp=sharing

    Broken Camera Movement Footage:
    https://drive.google.com/file/d/1xV0B-__-9RSqWNmn0FgZlHd5qC-DCOMB/view?usp=sharing

    Also here are Screenshots of the Main Camera with its components, the FreeLook camera, and the Virtual Camera.

    The Free Look Transition is set to Screen Space Aim When Targets Differ and the transition is done inside a timeline.


    Thanks in advance for any help,
    Best wishes,
    Lukas

    upload_2021-5-6_9-47-27.png

    upload_2021-5-6_9-48-1.png

    upload_2021-5-6_9-48-23.png
     
    Last edited: May 6, 2021
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,238
    1. Where is the Camera Look At target in relation to the Player target?
    2. Does the jitter still happen if you remove the CM collider?
    3. What version of CM are you using?
     
  3. lukasleder

    lukasleder

    Joined:
    Sep 7, 2017
    Posts:
    16
    Hey Gregoryl,
    1. The camera look at target is in front of the player, i'd say about 4 units, it Is animated through the timeline.
    2. I will check without the collider soon and get back to you on that one.
    3. I'm using Cinemachine 2.6.3 and unity 2020.2.0
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,238
    Can you show me a picture that illustrates the player, with the Player transform and the Camera Look At transform indicated? A side view would be good.
     
  5. LukasBigitec

    LukasBigitec

    Joined:
    Aug 19, 2020
    Posts:
    8
    Sure, it would be similar to this. I also checked with disabled collision, same issue.
    upload_2021-5-12_8-18-8.png
    I have run into this issue at a bunch of places, just so you know. It's not a one of to this location.
    Thanks again for taking a look!
     
  6. gaborkb

    gaborkb

    Unity Technologies

    Joined:
    Nov 7, 2019
    Posts:
    856
    Could it be impulse triggerring? What happens if you disable Impulse Source on your Main Camera or the Impulse Listeners on your vcams?
     
  7. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,238
    Thanks for the image, but I'm not really sure what's what in it.
    Nothing egregious leaps out at me.
    Any chance that you can make this happen in a small repro project you can send me? Then I could dig into it and figure out what's going on.
     
  8. LukasBigitec

    LukasBigitec

    Joined:
    Aug 19, 2020
    Posts:
    8
    Tried disabeling them but no impact, I caught the event in editor mode and saw, the vcams where stable, it's just the main camera that's jittering
     
  9. LukasBigitec

    LukasBigitec

    Joined:
    Aug 19, 2020
    Posts:
    8
    Sorry, yeah in retrospective the image was pretty bad :D
    I tried recreating the issue with no real success, I caught the event in edit mode though, and was able to traverse through it step by step, I added markers to all the important objects. (Pink is the FreeCam, yellow the Vcam of the timeline, the magenta diamond I the look target of the vcam, and the player tag is the target of the freecam)
    https://drive.google.com/file/d/1v6-U13zHJRrX-_t04IxLhVu-cq9pno80/view?usp=sharing
    I hope this brings some more insight into the problem!
     
  10. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,238
    Can you show me your scene hierarchy, with all the relevant objects visible? It might be a parenting thing.
     
  11. LukasBigitec

    LukasBigitec

    Joined:
    Aug 19, 2020
    Posts:
    8
    Sure, here's the hierarchy, or the important bits at least, I will try unparenting the freelook cam from its target, to test if it still happens!
    Edit: Tried unparenting the Freelook, didn't make a difference.
     

    Attached Files:

  12. mishakozlov74

    mishakozlov74

    Joined:
    Aug 8, 2018
    Posts:
    133
    I have the same issue, but if I use Fixed Update for Update Method on CinemachineBrain, it's better.
    Not sure about other options, but maybe it's your case too.

    P.S. I used to have this issue with Smart Update.
     
  13. LukasBigitec

    LukasBigitec

    Joined:
    Aug 19, 2020
    Posts:
    8
    I think I did that once in the past but it didn't work. Anyway, I tried it again, but sadly this didn't fix the issue either.
    Thanks for the suggestion though!
     
  14. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,238
    Sorry for the delayed response. For sure the FreeLook should not be a child of its target. Same goes for the main camera. Take the main camera out and put it in its own GameObject, not as a child of any of the vcams or targets.