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. Dismiss Notice

Cinemachine causes camera to move in the editor mode.

Discussion in 'Cinemachine' started by castor76, Jan 29, 2019.

  1. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,511
    As the title suggests Cinemachine causes the camera to move in very very amount even in editor mode. Not playing. The movement seems like in one direction in very very small amount, but it moves constantly.

    disabling the cinemachine attached to camera, stops the camera from moving.

    Is this known/intended behavior?
     
    nx-sm likes this.
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,233
    We have not heard of this behaviour before. Can you post a small package that reproduces the problem?
     
  3. Alex_Night

    Alex_Night

    Joined:
    Oct 7, 2018
    Posts:
    3
    i have the same issue, its very annoying
     
  4. mrCharli3

    mrCharli3

    Joined:
    Mar 22, 2017
    Posts:
    956
    same, really annoying..
     
  5. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,233
    Can you show an image of the inspector of the vcam that's moving?
     
  6. RemiOuterminds

    RemiOuterminds

    Joined:
    Mar 23, 2017
    Posts:
    10
    Bump.

    Every call to Repaint the SceneView will cause camera to move, and thus changes in my scene, which I do not want.
    Only VCam active has a framing transposer, but no follow target is set in Edit Mode.

    Is there a way to disable Cinemachine from running at all in EditMode?
     
  7. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,233
    I don't know how to repro this, so it's hard for me to comment. If someone who is having this issue can make me a small repro project then I can look into it and perhaps say something intelligent on the topic :)

    You can do it by putting the CMBrain in Manual update mode and writing a script to update it, that doesn't execute in edit mode - or that switches it to another mode when playmode is entered.
     
  8. Richay

    Richay

    Joined:
    Aug 5, 2013
    Posts:
    81
    I'm having this behaviour too. I'm on Unity 2020.2.3f1 and Cinemachine 2.7.1.

    It's not 100%, but it's definitely related to not reloading the domain. My framing transposer was constantly zooming out (in both editor and play mode), even after restarting Unity, until I caused a recompile. Immediately afterwards, everything was fine again.
     
  9. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,233
    Can you make a repro project with this? It's not too late to get a fix in for 2.7.2 - if we hurry
     
  10. Richay

    Richay

    Joined:
    Aug 5, 2013
    Posts:
    81
    Sorry, no solid repro other than repeatedly entering play mode without reloading the domain - sometimes when play mode starts it messes up, sometimes not.

    Brain on the camera:

    upload_2021-2-11_20-42-30.png

    Framing transposer:

    upload_2021-2-11_20-45-24.png

    Target group (note that the list is empty until a player joins, although the issue still occurs without a player present):

    upload_2021-2-11_20-44-20.png
     
  11. tnpcook1

    tnpcook1

    Joined:
    Feb 19, 2014
    Posts:
    2
    Similar issue, however my Brain is on a separate object, and this only happens to a single virtual camera.
    Doesn't seem to affect me in play mode at all, but it rotates around the character to strange positions when the editor view updates.
     
  12. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,233
    What version of CM?
     
  13. Nhil

    Nhil

    Joined:
    Jul 16, 2020
    Posts:
    1
    Hello everyone, I had such a problem, I dealt with it. I found that my camera just follows itself.

    You just need to make sure that the camera or camera parent objects are not in the Follow and Look At fields.
     
  14. Rubiix

    Rubiix

    Joined:
    Nov 20, 2019
    Posts:
    4
    I had this issue at a large scale where random buttons made the cam moved varying amounts. The FreeLook cam field of Follow was set to follow a player which had a camera attached. Moving the cam to a child of the player fixed the issue
     
  15. Epsilon_Delta

    Epsilon_Delta

    Joined:
    Mar 14, 2018
    Posts:
    207
    I have similar issue too, camera moves when Unity recompiles the scripts. I have a simple camera with cinemachine brain, than a tracked dolly and dolly virtual camera that aims at group.
    When I enter the play mode, camera positions itself correctly, then I copy the transform and paste it in edit mode. Everything is OK but then, camera rotates a bit when when I recompile the scripts or call:

    UnityEditor.Compilation.CompilationPipeline.RequestScriptCompilation(UnityEditor.Compilation.RequestScriptCompilationOptions.CleanBuildCache);


    Unity 2021.1.20f1
    Cinemachine 2.7.9
    upload_2022-9-3_11-51-27.png
    upload_2022-9-3_11-51-52.png upload_2022-9-3_11-52-27.png upload_2022-9-3_11-52-52.png upload_2022-9-3_11-53-4.png

    @Gregoryl if you want, I can try to reproduce it in some minimal project and send it where you want to, or even create a bug report
     
  16. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,233
    Yes please, that would be very helpful. Thanks for bringing this up.
     
  17. Epsilon_Delta

    Epsilon_Delta

    Joined:
    Mar 14, 2018
    Posts:
    207
    I submitted a bug report: IN-15838
     
    Gregoryl likes this.
  18. AlizerDoesSQL

    AlizerDoesSQL

    Joined:
    Aug 17, 2018
    Posts:
    4
    any updates for this? i have this bug too
     
  19. Epsilon_Delta

    Epsilon_Delta

    Joined:
    Mar 14, 2018
    Posts:
    207
    I just now received an email with resolution "As Designed" and these are the resolver notes:

    "Resolver: Resolution Notes: The transform and fov values change, because that's how GroupComposer works. It has several ways to compose a group (zoom only (fov) , dolly (transform) and zoom (fov), etc). These behaviours are calculated at runtime, so that's why you see the changes after entering playmode."

    Very weird answer, because I never mentioned anything about play mode, it all happens in edit mode while recompiling scripts. And as if I didn't know that the values are supposed to change in runtime...

    But anyway it seems that in the newest version of Cinemachine package and Unity Editor, this issue is not reproducible, so there is hope.
     
  20. unity_21000044

    unity_21000044

    Joined:
    Sep 24, 2022
    Posts:
    1
    I'm still having the same issue in Unity 2022.3.1f1
    I could upload a zipped file of the project so you can look at it( the file is a bit large). I have no idea why this is happening. It's also affecting the gameobject to move far away and when I hit play, the gameobject stays where the bug moved it to.
    I hope someone can show me a solution for this.
     
  21. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,233
    Which version of Cinemachine are you using? Check in the package manager. Try upgrading to the latest CM 2.9.7 and let me know if there is still a problem.
     
  22. jasonMcintosh

    jasonMcintosh

    Joined:
    Jul 4, 2012
    Posts:
    74
  23. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,233
    The issue you referenced was marked "won't fix" because the effect was the result of user error. I've added a comment from the internal files to the issue, explaining that.
    With correct usage, Cinemachine should not cause the camera to move continuously while in the editor. If you would like to share a simple project that reproduces your issue, we can help diagnose it.
     
  24. Epsilon_Delta

    Epsilon_Delta

    Joined:
    Mar 14, 2018
    Posts:
    207
    Well I have submitted ticket with an example project a year ago. As I wrote a few posts above, it returned to me with status "As Designed" with a bit of a non-sensical explanation, I replied to that and the ticket was reopened and nothing happened since (awaiting further review) IN-15838.
     
  25. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,233
    IN-15838 links to this issue (are you able to view it?) The comment there is that the issue is not reproducible on recent versions of CM. Did no one communicate that to you?
     
  26. Epsilon_Delta

    Epsilon_Delta

    Joined:
    Mar 14, 2018
    Posts:
    207
    I did not receive any updates, no. But I have not noticed that link in the jira ticket. Quick test shows me that indeed the camera transform is not modified anymore. I have not noticed that it's fixed until now, probably because upon recompilation I still get that asterix on the opened scene in the hierarchy signaling that the scene is modified - but it is another issue (unknown yet, but surely completely unrelated to cinemachine).

    Thanks.
     
  27. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,233
    Sorry about the confusion. IMO that info ought to have made its way back to the original issue so that you get notified. I don't know why that didn't happen in this case, but I will update the issue now.
     
    Epsilon_Delta likes this.