Search Unity

Physics change when Game view and Scene both visible in editor

Discussion in 'Physics' started by JamhammerDev, Jun 13, 2020.

  1. JamhammerDev

    JamhammerDev

    Joined:
    Jul 11, 2015
    Posts:
    28
    We're running into a strange issue, ( 2019.3.6f1 ) where our 2d collisions will pass through or miss one another when the game view is the only view active. When docking game and scene together, our collisions run normally. If we close the scene view again, the same issues come back.

    Any ideas? Thank you.

    EDIT: Turns out my whip wasn't on FixedUpdate, which I previously thought we had changed it to.
     
    Last edited: Jun 20, 2020
  2. JamhammerDev

    JamhammerDev

    Joined:
    Jul 11, 2015
    Posts:
    28
    Posted a video of the result, still facing this issue. @14 seconds shows the switch to Scene view.

     
  3. Eldarado123

    Eldarado123

    Joined:
    May 17, 2021
    Posts:
    7
    Not sure if you ever figured out why this happens, but I'm having a similar issue where my player seems to have more friction or something when I have both views open. With just the game view, it slides across the ground easily. It's very strange that having the different views open can affect physics.
     
  4. tjmaul

    tjmaul

    Joined:
    Aug 29, 2018
    Posts:
    467
    Either drag is always multiplied by the number of open viewports or you might be doing something in your code that is framerate dependent that shouldn’t be.

    Are you calculating drag in Update()?
     
    Eldarado123 likes this.