Search Unity

Scene view navigation with WASD very laggy

Discussion in 'Editor & General Support' started by Rodolfo-Rubens, Jan 17, 2016.

  1. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,197
    I'm having a very strange lag when navigating in the scene viewport using the WASD/QE keys, there is also a very big (relatively) delay when you are moving to the left (using A key) and suddenly switches to the right, the camera stops for a moment then starts moving, it is also stuttering a lot when moving around. I started a new scene and only created a cube in it, deleted the light but seems like this issue has nothing to do to any of this, I also maximized the scene viewport and decreased the unity editor window sized and tested to see if it had something to do with the resolution but the issue persisted, switching to the fastest settings on the quality settings also changed nothing and switching the rendering path to forward also didn't had any effect.
    What could it be? This behavior is annoying me for a long time now...

    Edit: when you enter play mode the issue is no more, but when you exit the play mode the issue comes back.

    Edit 2: When I was going to record the issue in fraps the issue stopped while the fraps was recording, it looks like fraps was forcing unity to render the fps that was setup in fraps (29.97), but when I stopped recording the fps showing for the scene view was around 1-14. It is like unity is refusing to update the scene view even though I am holding the right mouse button over it.

    Edit 3: Restarting the editor ceases the issue (still with some stutters but not a big deal), changing the layout scheme makes the issue come back.
     
    Last edited: Jan 17, 2016
  2. CitrusB

    CitrusB

    Joined:
    Feb 13, 2014
    Posts:
    4
    Just upgraded to Unity 5.2.4; this issue is also happening to me and I cannot seem to resolve it. Even in a freshly created project, the stuttering persists. While being on play mode, the problem dissapears. Well, in short, the exact same thing is happening to me.

    Hope someone finds a way to solve this!

    Edit: Umm, for some reason, activating Animated materials on the scene view fixes the stuttering and jumping, but it still lags a little. Activating fog, skybox and flares also seems to help a little... Weird?
     
    Last edited: Jan 17, 2016
    Stardog and Rodolfo-Rubens like this.
  3. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,197
    Yes, the exactly same thing happens here! The more the editor needs to updates itself the lag decreases I think...
     
  4. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    "Scene view navigation with WASD very laggy"

    yes switching keys is laggy, though if you just hold them down its fine, let go and go in another direction or even the same direction again, and it lags initially, also it doesn't carry the speed momentum from before which is good and bad, depending on the camera speed you left off at.. i get so annoyed with the hardcoded built in speed, where everything starts off slow, but hold down the movement key for a few seconds movement speed gradually increases and increases... that should be adjustable for the kind of scene scaling you are going with.

    I wouldn't mind if there some effing control over it, but the unity option screen is devoid of bloody options for a lot things.

    oh and mousewheel zooming in editor.. it seems to control the editor camera clipping planes aswel but you would never know it
     
    Rodolfo-Rubens likes this.
  5. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,197
    Even going in a single direction like, holding W for example, it stutters a bit, the camera does not "flies" straight without stuttering, at least here, this is just a matter of letting the scene view updates every frame whenever the right mouse button is being held I think.
     
  6. lemDace

    lemDace

    Joined:
    Feb 27, 2012
    Posts:
    13
    Did you end up working out a fix for this Rodolfo? I am having the same issue, it seems to be the worst when i have Visual Studio open at the same time (which is generally most of the time!) If i close that down then it smooths out mostly, and i dont get the huge leaps in camera position when i change the direction key.
     
  7. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,197
    Hey @lemDace, I'm still having this issue, and I'm afraid there is no fix for this, at least not for us users. :(
     
  8. Gordyne

    Gordyne

    Joined:
    Feb 22, 2016
    Posts:
    32
    Happens to me too, and I only have a plane and a 6k tris char on it.

    I hope they manage to fix it.
     
  9. zombie_psy

    zombie_psy

    Joined:
    Oct 9, 2012
    Posts:
    62
    I'm using Unity 5.3.2. The WASD movement in scene/editor view is extremely laggy, causing uncontrollably massive stuttering up to 1 to 3 to 5 seconds at a time.

    Navigating with the maya (alt+mouse click) controls work fine with no stuttering.
     
    Last edited: Feb 28, 2016
  10. Shykeas

    Shykeas

    Joined:
    Apr 11, 2015
    Posts:
    145
    Please, tell me how one is able to use WASD keys to navigate in Scene View. o_O That feature doesn't exist with me, and I'm forced to use the Arrow Keys.
     
  11. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    Keep the right mouse button pressed then you can use WASD in the scene view.
     
  12. Shykeas

    Shykeas

    Joined:
    Apr 11, 2015
    Posts:
    145
    Hmm. Thanks. I'll try that now.

    Interesting. thanks! :D I do see an error with the A. Sometimes it's not working as I'm holding it, but nothing to do with it lagging. Just let go and press it again. I'll use this a little more and see what I can find.
     
  13. Verkel

    Verkel

    Joined:
    Jun 2, 2013
    Posts:
    4
  14. FlashPaperGrind

    FlashPaperGrind

    Joined:
    Mar 6, 2016
    Posts:
    1
    I nearly turned into a raging lunatic when Unity lagged using WASD. I have a high end PC carrying a Titan X etc etc and the issue was horrible. I kept switching between Unity and UE4 to see if it was maybe a shader updater failure on my gpu..

    I tried what you guys suggested (enabling fog, skybox etc).... problem solved! No more lag at all :)

    So thanks for the quick fix :D
     
  15. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,197
    This didn't solve my issue, still lagging as hell, it seems like each version it gets worst. Now is lagging in panning, and orbiting.
     
  16. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    [SOLVED FOR ME] The issue for me was Animated Materials in the Skybox/Fog/etc button at the top of the scene view, as mentioned in post #2.

    This needs to be fixed. Clearly Animated Materials forces some kind of constant update to the scene view that WASD isn't providing, hence why wiggling the mouse with RMB held also updated the view and smoothed it out.

    It must be a year without a fix for this so far, and I only just noticed that others had figured this out.
     
    Last edited: May 3, 2016
    malcolm341, Flavelius and fffMalzbier like this.
  17. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    I have seen Unity having serious problems with updating it's windows often enough. I thought our game was lagging out like crazy, but Unity reported a very high framerate. Turned out that most of the frames were simply not being rendered in the editor. This only happened with a dual monitor setup.

    What fixed it for me was switching the graphics API from DirectX to one of the OpenGL ones. Can't remember which. This was a while ago, and the problem has mostly gone away, but I'd suggest trying it to see if it helps in any way.
     
  18. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,197
    I'm not seeing lag in the 5.4.0b16, this is the second time I launch this version of the editor and everything seems ok!

    edit: Still stuttering in 5.4.0b18
     
    Last edited: Jun 3, 2016
  19. mark_cb

    mark_cb

    Joined:
    Jun 9, 2015
    Posts:
    17
    This has been frustrating me for months now and hopefully Rodolfo Rubens report means a fix is incoming but I have a temporary fix/workaround for anyone that is annoyed by this.

    Workaround/Fix
    Open a webpage that has something constantly running and leave it playing in the background. For example a youtube video but I typically have bloomberg.com running. As long as it's not minimised you can leave it behind your unity window and the contant ticking of that pages update appears to keep the sceneview refreshing properly and the stuttering camera is fixed.

    It's silly, but it works.
     
    Rodolfo-Rubens and Stardog like this.
  20. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,197
    Actually, still stuttering. @mark_cb solution works here though.
     
  21. x4000

    x4000

    Joined:
    Mar 17, 2010
    Posts:
    353
    Just a heads up, this asset solves the problem for me: https://www.assetstore.unity3d.com/en/#!/content/18949

    Whether that means you want to get the asset, or write some quick code that triggers the scene view to update more frequently, is up to you. I have no affiliation with the asset author, and if it doesn't work for you I'm hugely sorry. I'd almost rather you just tried some sort of custom code that anybody can then use, anyway.

    Cheers!
    Chris
     
  22. x4000

    x4000

    Joined:
    Mar 17, 2010
    Posts:
    353
    Update! Dang, but the problem has returned even in the spiffed-up scene view. Sorry folks. :(
     
  23. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,197
    I wonder when they are going to fix this!! :(:(
     
  24. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    Nevaaar
     
  25. Crystalline

    Crystalline

    Joined:
    Sep 11, 2013
    Posts:
    171
    Still not fixed. They add all kinds of new stuff but not fixing this CRUCIAL issue.
     
  26. x4000

    x4000

    Joined:
    Mar 17, 2010
    Posts:
    353
    It's more than just scene view navigation. Having the editor open in DX11 in general is just a disaster for me on any of the computers I've tried it on. DX11 in players is fine, but DX11 in the editor causes background processing to be high, graphical issues in the menus, and then the slowness and hitching in general. In my case, simply using OpenGLCore or Vulkan solves the problem while leaving all of the capabilities I need. Or in some cases, just going DX9.
     
  27. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
    Has anyone made a script that forces editor to constantly update and solves this issue?
     
  28. DankDev22

    DankDev22

    Joined:
    May 2, 2017
    Posts:
    3
    Same issue here. makes the editor a real pain to use.
     
  29. x4000

    x4000

    Joined:
    Mar 17, 2010
    Posts:
    353
    DirectX11 is still pretty intermittently unusable for me in terms of the editor glitching out, and not just one one machine. It's four at this point. I pretty much always switch to OpenGLCore in the editor and then my problems all go away. I have not had the WASD slowness with that in quite a time; although more often than not, I use my 3DConnexion SpaceMouse now, with the custom unity driver that is free on the asset store, so that gives even more precision (and definitely no lag).

    Hopefully that provides some clue as to the other issues.
     
  30. EvilGremlin

    EvilGremlin

    Joined:
    Aug 12, 2016
    Posts:
    231
    This has been an issue for as long as I have used Unity. After switching back to Unreal for a bit and then coming back to work with Unity again it really makes me want to just stop using Unity. It's that bad.
     
    TeKniKo64 likes this.
  31. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    It's been laggy for years. Still happens in 2017.4. It won't be fixed anytime soon.

    The only way to fix some of these basics is for the Unity team to actually attempt to make a game just like Epic do. They will get so pissed off that it'll be fixed the next day.
     
    Last edited: May 27, 2018
    EvilGremlin, x4000 and TeKniKo64 like this.
  32. Deleted User

    Deleted User

    Guest

    I am using the same version and this problem has been driving me nuts. Have you found a work around?

    EDIT: A read about a user mentioning that playing a Youtube video in the bg will solve it. I thought he was joking but Good God it solved the issue! I don't however want to open youtube every time I use UNITY !!!
     
    Last edited by a moderator: May 27, 2018
  33. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    That was probably me who mentioned that. This still works if you have the skybox/etc button disabled. The video doesn't even have to be playing, and the Chrome window can also be minimised. As soon as you close the browser it stutters again, mostly when holding left-shift to move quickly.

    The only solution is to enable the Skybox/Fog/Flares/etc toggle button in scene view.
     
    Deleted User likes this.
  34. x4000

    x4000

    Joined:
    Mar 17, 2010
    Posts:
    353
    So here's the thing with the youtube videos in the background: basically, if you have two graphics cards (which if you have an intel cpu you do), then a lot of the time if the load is low enough it will default to a lower power mode on your main gpu, or go to the second gpu. This is for power savings, and is a windows feature. Unity is just being too efficient to trigger the full gpu usage, but not efficient enough to run well on the lower gpu or gpu power level.

    We had this problem with AI War: Fleet Command about 5 years ago, on an actual standalone game made in unity. Yikes, right?

    Anyway, I haven't had this issue with unity for some time now (a few years), but I am just now realizing that's probably because I upgraded to a 4K monitor and so my machine is always having to run on the larger GPU. I may have also adjusted my windows power settings to maximum performance rather than balanced. That's worth doing on your main dev machine anyhow, and might fix this.

    It's a frustrating issue, but honestly at this point I think it is more of a windows thing than a unity thing.
     
    EvilGremlin likes this.
  35. EvilGremlin

    EvilGremlin

    Joined:
    Aug 12, 2016
    Posts:
    231
    Changing power settings was an improvement. It still stutters but not as bad now and doesn't get that long hang every second I've been getting. Thanks a lot for that.

    You are probably correct. They need to try making a game with their own engine. It would be a big help to everybody who uses Unity.
     
    Deleted User and x4000 like this.
  36. x4000

    x4000

    Joined:
    Mar 17, 2010
    Posts:
    353
    My pleasure, I'm glad it helped.

    And I think that they do make some games and certainly videos with their own engine (just the free stuff, though), but I get the feeling they mostly work on Macs while the rest of us work on PCs. So much attention to the OSX side of things, which is a minority of the market. They need to make some games on WINDOWS, is I think the issue.
     
    EvilGremlin and Deleted User like this.
  37. Deleted User

    Deleted User

    Guest

    >I may have also adjusted my windows power settings to maximum performance rather than balanced.

    I did change this but nothing has changed. The strange thing is this just happened recently so even i've come to a conclusion that this could be a Windows thing. thanks for your input!

    I'm sort of at a cross roads here. There are so many things I like about the engine but these small things sort of are the most capable to get under your skin !!!

    EDIT: I just had a windows update and it seemed to have fixed this issue. Well, it clearly is a windows thing but here's to me hoping that Unity will get to the bottom of this.
     
    Last edited by a moderator: Jun 16, 2018
    Stardog and x4000 like this.
  38. Cicaeda

    Cicaeda

    Joined:
    Sep 29, 2017
    Posts:
    34
    Toggling these options fixes it for me.

    Unity_2018-08-15_17-35-07.png
     
  39. HonoraryBob

    HonoraryBob

    Joined:
    May 26, 2011
    Posts:
    1,214

    Thank you! And thank you for specifying "toggling", because other people just vaguely said to click on the stuff in that area without clarifying that you need to bring up the drop-down menu under the picture icon and then disable all options and then re-enable all of them. That seemed to work for me.
     
  40. malcolm341

    malcolm341

    Joined:
    Jan 4, 2017
    Posts:
    9
    This also worked for me, turning on animated textures completely fixed the lag.
     
  41. team_eden

    team_eden

    Joined:
    May 27, 2014
    Posts:
    8
    Worked immediately for me. Thank you.
     
  42. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,197
    What version are you guys using, I'm not having these problems since 2018.x...
     
  43. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,197
    This freaking thing is back in 2019.3.0b1 (19.3 alphas too)

    Funny thing is, if you open an youtube tab in chrome in a video page, you don't even have to play, it stops stuttering.

    I tried to record this issue with OBS but it seems like the same thing happens, if the OBS window is open, the stutters suddenly stops, don't even need to start recording.

    the "animated materials, post process toggle, etc" workaround doesn't work for me because I'm working on a very simple scene and there is nothing there for these things update ...

    edit: I'm very sad with these bugs haunting us for so long time, I have around 4 "pet" bugs that from time to time happens again then I search for a solution on google and I land on my own thread..
     
    Last edited: Aug 29, 2019
    Stardog likes this.
  44. x4000

    x4000

    Joined:
    Mar 17, 2010
    Posts:
    353
    This sounds like a different bug, with a different cause.

    I ran into something similar when developing a title in 2012: http://arcengames.com/avww-beta-0-930-bugfixes-are-always-better-when-they-involve-ponies-released/

    Except in my case it was on the player side, not editor.

    Basically, the editor is being TOO efficient, and the OS is defaulting you to a lower power management state of some sort. That either means running only some of your cores (possible on any computer), or it has decided to run on your integrated GPU rather than your discrete one (basically only possible on laptops, but quite likely on OSX or Windows).

    Basically for things that are "lightweight" like word processing, it wants to use the integrated GPU for the purposes of battery savings. Unity is running so efficiently now, apparently, that it is seeing it -- when static -- as being that.

    When you start moving the view around, it freaks out because that's suddenly a huge increase in GPU and CPU load compared to "just keep showing the cached view," and so your OS switches over to the heavier-duty GPU.

    Or if you only have one GPU, then this is just the same issue but with some of the cores being offline. I don't remember what my fix was in 2012 in the game I was making, but basically I think it involved giving a more consistent load so that the OS would never think that it could be okay in the power-saving mode.

    The reason I know this is the case with your scenario is because of the fact that unrelated processes can make the processing smooth. In those cases you're increasing load outside of unity, that tells the OS to kick things into a higher gear, and unity also then benefits.

    Most likely this new "bug" is just a matter of unity having become more efficient due to how they now handle IMGUI and UIElements, and there's nothing else going on that is causing enough load to kick processors or GPUs into their non-powersaving modes.

    Hopefully they can find an elegant way to tell the OS to give them priority non-powersaving mode without just having to do a bunch of wasted extra-heavy frames or something.
     
  45. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,197
    Ah this makes a lot of sense since I'm on a dell laptop and they have the fame of having their power management systems screwed, which maybe may increase the chances of this happening?

    Also, yes, it has 2 gpus. I just bought a display port -> type-c cable to run my monitor at 144hz aaaand... the problem is gone, there is now like some very micro-micro-micro stutters which is perfectly fine. I don't know if it was fixed because before I was using the hdmi port and the dedicated gpu is connected direct to it and now I'm using the type-c port - which is shown in the nvidia control panel to be connected direct to the integrated gpu instead - which is constantly being used and the dedicated gpu is not.... A lot of things to consider.
     
    x4000 likes this.
  46. mrnicksmith

    mrnicksmith

    Joined:
    Sep 21, 2019
    Posts:
    2
    This issue happened to me after creating some objects with probuilder. Once I toggled on the dimensions overlay I realized that these objects were in the tens of thousands of meters in size. When I deleted the objects and recreated them in the tens of meters of size then the speed for fly-through was very fast. I then deleted the object and recreated them using hundreds of meters of size and the speed was slower but bearable. I know people have fixed this all kinds of different ways but in the end what I realized was that somehow before I started creating the objects I was zoomed out way too far (like too the moon) and I realized this once I created a simple cube and dropped it on the scene I couldn't see it at all. Once I was zoomed in properly and I created objects this problem went away from me. Hope this helps someone.
     
    x4000 likes this.
  47. roshanjafri31_unity

    roshanjafri31_unity

    Joined:
    Mar 18, 2018
    Posts:
    1
    This is very weird , I am replying to your 4 years old comment and activating animated materials still fixes the issue. Wow unity. Thanks for the fix It was driving me insane
     
  48. ImpoliteSand868

    ImpoliteSand868

    Joined:
    Jan 10, 2018
    Posts:
    6
    Have you guys tried to delete other games/apps that you don't need, sometimes background processes from these games/apps and cause unity lag.
     
  49. x4000

    x4000

    Joined:
    Mar 17, 2010
    Posts:
    353
    That's really not what's going on here. Unity runs the scene view at a lower framerate when there isn't enough activity going on with animations or other components. It can also default to the CPU-integrated lower-powered GPU on a laptop rather than the discrete higher-powered GPU.

    There's not really a bug here, if you consider the general power consumption being low to be the proper goal. Personally I prefer a non-laggy view, so having it do enough that it avoids the lag is good.
     
  50. MrSanity

    MrSanity

    Joined:
    Feb 27, 2019
    Posts:
    1
    I've had this problem on my new desktop workstation that I put together over the weekend, and I never had this problem on my HP mobile workstation. But I figured it out!! (at least something that works for me, might work for you too)

    1. In the nVidia control panel, go to "Manage 3D Settings" on the left-hand side near the top.
    2. Add a new application by clicking the "add" button next to the drop-down menu.
    3. Find the executable for the specific version of unity editor you are using.
    4. Once added I changed 5 of the settings from their defaults:

    a. Antialiasing - Gamma correction: off
    b. Monitor Technology: Fixed Refresh
    c. Power Management Mode: Prefer maximum performance
    d. Preferred Refresh Rate: Application-controlled
    e. Vertical Sync: Use the 3D application setting
    (I also set Max Frame Rate to 60 but I'm not sure that's necessary)

    After making those changes Unity (I'm using 2018.x but it'll probably work for others) is running perfectly for me! No noticeable stutter when using WASD in scene view or anywhere else for that matter. I couldn't be happier!!

    Somehow I think this problem may stem from nVidia's power management. That would make sense then, why enabling shaders and sky-boxes made it perform better, but now I can work without sky-box or lighting! YAY!!!!

    Cheers, everyone! If this works for even one other person I will be ecstatic!
     

    Attached Files:

    x4000 likes this.