Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

Physics causing lag spikes

Discussion in '2018.1 Beta' started by jjzpgg, Jan 27, 2018.

  1. jjzpgg

    jjzpgg

    Joined:
    Aug 15, 2017
    Posts:
    8
    I'm getting some horrible lag spikes after upgrading a project to 2018.1.0b4. The Profiler says it's being caused by FixedUpdate.PhysicsFixedUpdate,and the main offenders appear to be PhysX.PxsAABBmanager.actorAABB and PhysX.ScScene.postIslandGen. It only happens with the FPS Controller and not a static camera. Anyone else have this issue? I know this has been an issue previously but as I've made no changes to the FPS Controller between 2017 and 2018 can only assume it's an upgrade issue?
     
    TimDaville likes this.
  2. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,920
    I have the issue - have you filed a bug?
     
  3. Peter77

    Peter77

    Joined:
    Jun 12, 2013
    Posts:
    4,257
    I submitted a bug-report a while ago with 2018.1.0b1:
    (Case 983582) 2018.1: Physics.Processing performance issues

    profiler_physx.png

    QA replied with:
    Can't find it in the public Issue Tracker though.
     
    hippocoder likes this.
  4. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,920
    Where would we be without you?
     
    Joe-Censored, Krajca and Peter77 like this.
  5. jjzpgg

    jjzpgg

    Joined:
    Aug 15, 2017
    Posts:
    8
    Hmm, this doesn't seem to make a difference for me. But glad someone's logged it.
     
  6. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,920
    Yeah I'm not sure why vsync would make a difference either but that's for Unity to figure out.
     
    laurentlavigne likes this.
  7. georgeq

    georgeq

    Joined:
    Mar 5, 2014
    Posts:
    484
    I'm having this issue with the simplest scene possible, just a cube with a rigidbody attached. It is true that the V Sync Count setting affects the spikes, however changing this setting does not fully solve the problem, if I set this to "Every Second V Blank" the spikes still occur, less often but there are still frames that require more than 35ms, changing this setting to "Every V Blank" reduces the frequency of the spikes even more, but they don't disappear completely and sometimes frames take more than 60ms to complete.
     
    Daniel__Vernon likes this.
  8. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    189
    Last edited: Mar 16, 2018
  9. Fuzzy

    Fuzzy

    Joined:
    Feb 11, 2011
    Posts:
    266
    At least Android builds work fine for me, but in-editor testing is pretty much unbearable like this imo.
     
  10. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    1,713
    Peter77 and hippocoder like this.
  11. Fuzzy

    Fuzzy

    Joined:
    Feb 11, 2011
    Posts:
    266
    still having this issue in b12 :(
     
  12. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    1,713
    That is not b12. It's a custom build based on the b12 development branch. I don't know if the batch with the fix had made it in yet when they built this version.

    Edit:

    I checked it and it got delayed somehow. The one after b12 will have it then...
     
  13. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,920
    Yes it seems like the build used internally just for ECS work. So here is hoping for next.
     
  14. Fuzzy

    Fuzzy

    Joined:
    Feb 11, 2011
    Posts:
    266
    oh well okay then.

    Could be worse.

    Thanks for the quick reply!
     
  15. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,083
    Still have the problem here with Beta 12 released on March 23rd.
     
  16. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,920
    I think this beta was due to have it fixed but it's really just an ECS-compatible build. We might see it in 13 if all is well.
     
  17. Brad-Newman

    Brad-Newman

    Joined:
    Feb 7, 2013
    Posts:
    112
    Any ETA on a fix? This is really hurting our project at the moment!
     
  18. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    1,713
    b13 has it.
     
    hippocoder and GameDevCouple_I like this.
  19. JonDadley

    JonDadley

    Joined:
    Sep 2, 2013
    Posts:
    139
    Confirmed, b13 has fixed the physics spike issue in my project.
     
    Peter77 likes this.