Search Unity

Question Free Look Camera slightly rotates on its own

Discussion in 'Cinemachine' started by Daraen, Sep 12, 2021.

  1. Daraen

    Daraen

    Joined:
    Sep 19, 2018
    Posts:
    1
    Hi there!

    I think I've run into a small issue with Cinemachine's Free Look Component. I don't know if this is an actual bug or simply some parameter I missed.

    The setup is simple:
    • In an empty scene, create a Game Object. This is the target. It can be a sphere, a cube, a more complex mesh or an empty object, it doesn't matter.
    • Add a Cinemachine Brain component to the Main Camera object. You can leave its default properties.
    • Create a new Game Object and add a Cinemachine Free Look component to it. This is the virtual camera.
      • Set the Follow and Look At properties to the target Game Object created earlier.
      • The aim is to rotate the camera around the target, horizontally and vertically. You may need to configure the Axis Control properties or add a Cinemachine Input Provider component accordingly.
    In the Inspector, select the Main Camera object to keep track of its position and rotation. Then run the scene and rotate the camera around the object.

    For some reason, after some time, even when I'm not rotating the camera manually, it still rotates on its own horizontally.

    I've noticed the rotation is faster when the camera is rotated 90° or -90° on the Y axis, and it rotates towards 180° or -180° (the closest of the two). However, there's almost no rotation at 0°. The longer the simulation runs, the faster it gets.

    Setting the time scale to 0 (through the Project Settings or via scripts, i.e. for a pause menu) doesn't seem to stop this rotation. Blending to a second virtual camera, then back to the first one, has no effect either.
    However, disabling then re-enabling the virtual camera object (or its component) "resets" this effect.

    This is a slight rotation that's been bugging me for days. Any idea how to solve this?
     
    gaborkb likes this.
  2. ozzyonfire

    ozzyonfire

    Joined:
    Dec 18, 2012
    Posts:
    6
    Do you have "Recenter to Target Heading" enabled? I had the same problem you are having - after a certain amount of time the camera would slowly reorient itself.
     
  3. gaborkb

    gaborkb

    Unity Technologies

    Joined:
    Nov 7, 2019
    Posts:
    856
    Thanks for reporting this issue. We could reproduce it. We are going to look into it. ;)
     
    Daraen likes this.
  4. gaborkb

    gaborkb

    Unity Technologies

    Joined:
    Nov 7, 2019
    Posts:
    856
    This has already been fixed around March. ;)
    You'll need to update your Cinemachine package from the Package Manager (Window -> Package Manager -> Cinemachine -> Update).
     
  5. PlayerTwoPublisher

    PlayerTwoPublisher

    Joined:
    Dec 27, 2021
    Posts:
    18
    In what version was it fixed? Unfortunately, it's still happening on version 2.6.15. After you move the target around for a while, the camera starts to autorotate faster and faster.
     
  6. DekeDev

    DekeDev

    Joined:
    Aug 13, 2017
    Posts:
    1
    Same question as the post above mine. This is still very much an issue in current versions of cinemachine.
     
  7. gaborkb

    gaborkb

    Unity Technologies

    Joined:
    Nov 7, 2019
    Posts:
    856
    Just checked and I cannot reproduce the issue on 2.8.9.

    Could you send me a repro project? What's your editor version and Cinemachine version?
     
    Last edited: Oct 13, 2022
  8. wyao0819

    wyao0819

    Joined:
    Oct 1, 2019
    Posts:
    4
    I am encountering the exact same problem.. unity 2021.3.16 and cinemachine2.9.7
     
  9. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    If you could send us a repro project that would help us diagnose this problem. We don't have enough info to reproduce this ourselves.
     
  10. Mordecai_Fitness

    Mordecai_Fitness

    Joined:
    Nov 29, 2023
    Posts:
    1
    hi i also need hlep guysisrtjg0irpksfop]esdf