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

Bug physics broken/changed in Unity 2022 LTS?

Discussion in 'Physics' started by metaphysician, Aug 17, 2023.

  1. metaphysician

    metaphysician

    Joined:
    May 29, 2012
    Posts:
    186
    hey folks i'm a teacher at school and we have older Unity projects that we use for students to learn. trying to stay up to date i updated these to Unity 2022.20 LTS and it appears physics gravity isn't working anymore. these projects have been largely unchanged since Unity 5.6 and have consistently worked as i have updated them previously.

    to test this i made a completely blank scene, added a plane with a collider and a sphere with a rigidbody and enabled it Use Gravity and positioned it above the plane. in 2022.20 LTS the sphere hangs there during playback, but in 2021.3.25 LTS it works as it should and falls to the surface of the plane.

    so what's up? this is about the most basic thing i could imagine implementing and it clearly shows a major difference between Unity 2022 and Unity 2021 and earlier. is there some new physics parameter that needs to be enabled? i would really like it if the change were backward compatible to older Unity versions. any help appreciated!
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,468
    Maybe the simulation mode is set to "Script" therefore it's not automatically simulating? You can check this in the Project Settings > Physics.
     
    metaphysician likes this.
  3. metaphysician

    metaphysician

    Joined:
    May 29, 2012
    Posts:
    186
    indeed that was the issue! thanks! so i'm curious - since it was set to simulation via script then why did it work fine in Unity 2021?
     
  4. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,468
    Maybe there was a problem when updating the old "AutoSimulation" property to the newer "SimulationMode" enum. For 2D physics this is handled fine but maybe there's a problem in such an update for 3D physics. I'm not a 3D physics dev though.