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

Resolved Help!My freelook camera shaking when I move my character.

Discussion in 'Cinemachine' started by Beike, Jun 3, 2021.

  1. Beike

    Beike

    Joined:
    Dec 10, 2017
    Posts:
    13
    I hope I can move basing on camera's direction,so I set Binding Mode as World Space to get camera's X Axis 's value and I use it to rotate my character.
    A Character Controller is added on my character and I use CharacterController.Move(transform.forward * speed * Time.fixedDeltaTime) in FixedUpdate() to move.
    In addtions,I add a Cinemachine Collider on camera to avoid seeing scene's insides.
    Now,when I move my character,I find my the camera is crazily shaking(the move speed bigger and the shaking more crazier).That's why? How I fix it?
     
    Keguri likes this.
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,268
    Jittery cameras can come from a number of sources. Most of the time it's a mismatch in the time clocks: characters moving on one clock, but the camera tracking on another (I'm talking about Update vs FixedUpdate).

    What is the Update Mode of your CM Brain?
    Do you have any other script that affects the player's transform outside of FixedUpdate?
    What version of Cinemachine are you using?
    Can you post a picture of your scene hierarchy that shows the main camera, the FreeLook, and the player?
     
    Keguri, igorobm, SUPERHEii and 5 others like this.
  3. Beike

    Beike

    Joined:
    Dec 10, 2017
    Posts:
    13
    Thanks!I set Update Mode of CM Brain as FixedUpdate and the Camera can follow my character smoothly!(I don't know any about this before)
     
    Keguri, Abiogames, berkay3534 and 2 others like this.
  4. carored

    carored

    Joined:
    Mar 21, 2018
    Posts:
    11
    Thank you so much! I didn't know about that option either, mine was on "Smart Update" I change it to "FixedUpdate" and now is smoothly :)
     
    LiiCastro and Abiogames like this.
  5. SUPERHEii

    SUPERHEii

    Joined:
    Aug 10, 2022
    Posts:
    1
    Thank you very much. Your answer helped me solve this difficult problem!:)
     
  6. ResonantWilterUni

    ResonantWilterUni

    Joined:
    Jul 20, 2023
    Posts:
    44
    Late reply but this also helped me with an issue of mine, thanks for sharing it in the thread
     
  7. Rifayya

    Rifayya

    Joined:
    Oct 18, 2023
    Posts:
    1
    Thank you, changing from smart update to fix update in cinemachine brain fix my problem with unwanted shaking camera..