Search Unity

Dead/soft zone gizmos not showing in the game view.

Discussion in 'Cinemachine' started by BadWolfWagner, Oct 12, 2018.

  1. BadWolfWagner

    BadWolfWagner

    Joined:
    Apr 1, 2017
    Posts:
    4
    I imported Cinemachine, via package manager, to a brand new project.
    It's working perfectly but the gizmos for the dead zone, (blue) soft zone and (red) hard zone aren't appearing in the game view window. They work fine if edited in the inspector but actually seen the zones in the screen really helps.

    I even tried to open old projects where everything was ok and they are not showing any more.
    The last time I used was a few updates and I'm currently with Unity 2018.2.11f1.

    Is this a know issue with the new version of Unity or the new version of Cinemachine, or have I set up something wrongly?
     
  2. PGJ

    PGJ

    Joined:
    Jan 21, 2014
    Posts:
    899
    I assume that Game Window Guides is checked. Are the gizmos enabled in your Game view?
     
  3. BadWolfWagner

    BadWolfWagner

    Joined:
    Apr 1, 2017
    Posts:
    4
    Yes, they are.
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    What about this? Is this checked?

    upload_2018-10-15_12-51-19.png
     
  5. BadWolfWagner

    BadWolfWagner

    Joined:
    Apr 1, 2017
    Posts:
    4
    Sorry I took so long to reply. I've been too busy and haven't worked in this project in that past weeks.

    Anyway, yes. It is checked.

    I ended up finding out that they appear but only in play mode. Using "save during play" I can work with that just fine, but shouldn't they show up out of play mode too?
     
    rkdtjq613 and awsapps like this.
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    Yes they should show up outside of play mode too. Could it be that you have another Camera that's active when not in play mode?
     
  7. cmorait

    cmorait

    Joined:
    Nov 22, 2017
    Posts:
    59
    Same problem here with Unity 2018.3.2f1 (64-bit). I have only one camera in the scene and I have checked the Game windows guides.
     
    IrisChen29 and awsapps like this.
  8. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    @cmorait do you have more than one inspector window open?
     
  9. cmorait

    cmorait

    Joined:
    Nov 22, 2017
    Posts:
    59
    No, I have only one. They only can be seen if there is an object in "Follow" and "Look At" fields of the Cinemachine Virtual Camera Script. If you want to make a cutscene that you are not in the need to "Follow" or "Look at" then is not working.
     
  10. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    Yes, that makes sense, and is as expected. The guides are there to help you position the target on-screen. If there is no target, then the guides are pointless.
     
    Johnx140 likes this.
  11. cmorait

    cmorait

    Joined:
    Nov 22, 2017
    Posts:
    59
    I was using an older version and that was not an issue. Thanks.
     
  12. pabitrapadhy

    pabitrapadhy

    Joined:
    Feb 4, 2017
    Posts:
    6
    @cmorait
    I was also facing something similar.
    This could be checkmarks for anyone, who initially take a bit of time to understand how it works.

    In Edit Mode -
    • Make sure the Game Window Guides is turned on.
    • Make sure that you have a target for Look At
    • Make sure that in the Cinemachine Virtual Camera component, Aim is set to composer, because if the component is reset for some reason, it changes to Do Nothing.
    In Play Mode -
    • Make sure you've selected the currently rendering virtual camera, given that it satisfies the above criteria mentioned in the Edit mode.
    Cheers.
     
  13. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    I ran into this just now.

    Turns out the Cinemachine Brain has to be attached to the camera in order for the gizmos to show in the game view. The docs specify very strongly everywhere that the brain component should get added to the camera, but sometimes you just try things without reading the docs first :)

    Maybe the brain component should complain that it's not attached to a camera? Or just refuse to do anything if it's not? It seems like there's a fallback behaviour right now where it just happily moves Camera.main instead?
     
    Last edited: Apr 9, 2019
  14. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    The object with the Brain component is the object that gets moved. If your Camera is on a child object of that, then it will end up getting moved along with it. There is no fallback to Camera.main.

    We don't force a Camera component on the brain because in some situations it needs to be buried in the children (VR is one such instance). Also we don't want to preclude CM getting used in new creative ways that don't involve cameras. In the end, CM is just a fancy way to animate a game object's transform.
     
    SonicCane11 likes this.
  15. jpbaugh

    jpbaugh

    Joined:
    Jul 7, 2020
    Posts:
    1
    Here was my solution in Unity 2019.4. I am working on a 2D game and I saw the yellow square, and the blue and red framing, but no dead zone. It turns out that the dead zone had no size.

    So, to fix:

    1. Select the Cinemachine Virtual Camera in Hierarchy view
    2. Under the CinemachineVirtualCamera component in the Inspector, expand the Body property
    3. Make sure the Dead Zone Width and Dead Zone Height aren't 0
     
  16. DasBeuteltier

    DasBeuteltier

    Joined:
    Oct 16, 2020
    Posts:
    1
    I ran into the same problem.
    I fixed it, but I want to mention that the guidelines are only working in Display 1. Just to prevent others from getting frustrated, because they are the only one, who can't get this running.
     
    Last edited: Feb 27, 2021
  17. GameCodeurStudent

    GameCodeurStudent

    Joined:
    Jan 13, 2018
    Posts:
    9
    Hi in my game when i enter on play mode after some time there is no more soft zone only deadZone. And i dont know why exactly. If someone has an idea. Thx.
    Ah it look like whe are able to change this manualy on the game view. I need to find a way to lock it.
     
  18. MrJeanJean

    MrJeanJean

    Joined:
    Aug 6, 2018
    Posts:
    1
    Hi, ok just a quick feedback from my own experience. Guides disappear on Play Mode if "Maximize on Play" is on. Hope it helps.

    Cinemachine: v2.6.1
     
    Last edited: Nov 21, 2020
  19. wildjoe182

    wildjoe182

    Joined:
    Feb 3, 2021
    Posts:
    2
    Same for me, same version. Thanks for the solution.
     
  20. PeterGost

    PeterGost

    Joined:
    Jan 27, 2020
    Posts:
    18
    In 2020.3.01 you need to set in body to Framing Transposer
     
  21. mmcelt

    mmcelt

    Joined:
    Aug 15, 2016
    Posts:
    14
    I found you have to have the body panel expanded before they show...
     
    guiwolkan, noio, Angry8bit and 5 others like this.
  22. SinxLinonZ

    SinxLinonZ

    Joined:
    May 15, 2020
    Posts:
    1
    Almost same as @mmcelt but in my case I have to expand the Aim panel
     
  23. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    The guides show only if the relevant CM vcam inspector panel is displayed and expanded. This allows you to control which guides are visible in the event that multiple components (e.g. FramingTransposer, Composer, FreeLook rigs) want to display guides.
     
    skplunkerin likes this.
  24. ncr100

    ncr100

    Joined:
    Jul 23, 2015
    Posts:
    32
    Unfurling the "Body" panel fixed drawing the Gizmos for me as @mmcelt and @Gregoryl describe above. This is a side-effect and not easily discoverable.

    Perhaps the "Body >" (et al) text could be renamed to include this side-effect? Or some other ideas to improve UI discoverability?

    E.g.
    unity-gamewindowguides-idea.png
     
    skplunkerin likes this.
  25. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    Thanks for the suggestions, we appreciate them.

    We're aware of this discoverability problem, and are thinking about ways to improve it. We might decide to just back this change out and have the guides always visible if the Game Window Guides box is enabled.
     
    TeacherMax, skplunkerin and ncr100 like this.
  26. ncr100

    ncr100

    Joined:
    Jul 23, 2015
    Posts:
    32
    Good luck @Gregoryl - it is a problem - UI is like this sometimes (trade offs) - and I am happy now to know how to enable the Guides! It's a KILLER useful package, so :clap:.

    (FWIW I am first-time CM user, installing it due to a Code Monkey tutorial, "Make Games without Code? Master Visual Scripting in Unity!" chapter 19.)
     
    Gregoryl likes this.
  27. skplunkerin

    skplunkerin

    Joined:
    Jun 1, 2022
    Posts:
    1
    I feel like that would make the most sense, as the "Game Window Guides" box kinda implies to do that; it's odd and counter-intuitive to also need to expand the "Body" or "Aim" sections (especially when I need to expand them every single time I hit play, it's very frustrating they don't stay expanded :().

    If the "Body" and "Aim" sections show separate visual window guides, then it would make sense to replace the "Game Window Guides" box with these sections have their own "Game Window Guides" boxes, or some other box to "Include In Game Window Guides"; That would give the developer control on whether they want to see either or both of them while having "Game Window Guides" checked.

    Thank you everyone here for helping me find the solution to this (having "Game Window Guides" box checked, making sure the virtual camera is selected, and expanding "Body" or "Aim" sub-sections), this took me a long time to figure out. :confused:
     
    Gregoryl likes this.
  28. Diablo1903

    Diablo1903

    Joined:
    Nov 28, 2022
    Posts:
    1
    The solution to this now seems to be expanding the "Aim" panel, instead of "Body" as it was previously



    I am running Unity 2021.3.14f1
     
    guiwolkan likes this.
  29. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    It depends which section needs the guides. If you have Composer in Aim, then it's Aim. If you have FramingTransposer in Body, then it's Body.
     
  30. anur4g

    anur4g

    Joined:
    Dec 13, 2022
    Posts:
    1
    Thanks mate, worked for me.
     
  31. TeacherMax

    TeacherMax

    Joined:
    Jan 27, 2019
    Posts:
    9
    Just wanted to add my 2c
    If either Aim or Body need to be expanded in order to show the gizmos (maybe there is a technical reason for this) could checking 'Game Window Guide' expand the relevant areas when checked, and collapse when unchecked? Not ideal UX but at least a hint to the user.
    Alternatively - move the checkbox inside the relevant section - even if it ends up in both!
    Finally, stop closing Aim and Body on Run.
    I do appreciate there may be tech reasons why this is more complex (I always hate it when someone says "why can't you just..." But as it is I think it is something that just feels like a bug to most users who encounter it.
    And Cinemachine is brilliant!
     
  32. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    FYI in CM3 this is no longer an issue.
     
  33. RealHandy

    RealHandy

    Joined:
    Jul 11, 2020
    Posts:
    22
    Mildly related: I derived a subclass from FramingTransposer and the dead/soft gizmos don't show -- I have to load the standard FramingTransposer to get them, then remember the values and set them after switching back to my transposer class. Just in case anyone is subclassing it.
     
  34. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    Those things are (probably) drawn by the FramingTransposer's editor. So either subclass it for your own editor, or fork the code and have the FramingTransposerEditor set it's editorForChildClasses to true in it's [CustomEditor] attribute declaration.
     
    Gregoryl likes this.
  35. KaveeM2007

    KaveeM2007

    Joined:
    Jan 18, 2022
    Posts:
    21
    Hellow guys, there is a little thing I've noticed. Even though if you have Game Window Guides enabled, cinemachine won't show them if your Body or Aim settings are closed or collapsed. So do expand them to edit.
    Cheers...
     
    Haskarr and naCrimed like this.