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

Question why has gravity stopped working

Discussion in 'Physics' started by juliang, Jul 20, 2023.

  1. juliang

    juliang

    Joined:
    Nov 25, 2008
    Posts:
    96
    My gameobjects have suddenly stopped falling, they just sit in midair where they're spawned. Checked several things:
    - the RigidBody is still there
    - use gravity is on
    - is kinematic is off
    - all freeze options are off
    There is no scripting going on. Once they're spawned I just let the physics engine take over.

    These prefabs have been working for months. Why would they suddenly stop?
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,468
    There's no way we can know.

    Are you simulating? Maybe you've got it set to manual simulation. All we can do is guess as you've not shown anything.
     
  3. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,423
    I've seen some complains about the physics simulation option being disabled when upgrading the project to a newer Unity version. Ensure the option Auto Simulation is enabled in Project Settings > Physics:

    upload_2023-7-20_10-7-32.png
     
  4. juliang

    juliang

    Joined:
    Nov 25, 2008
    Posts:
    96
    Rats, that's not it - the option is still on. Just to make sure, I turned it off, played the scene, turned it back on, played the scene. Everything is still floating up in space.
     
  5. luskos

    luskos

    Joined:
    Mar 4, 2013
    Posts:
    48
    Check if there isn't any collision box in the way that make it hang. I had this kind of problem. A procedural map plugin I used were spawning a collision box after it was done and my character that used to start in mid air fall just hanged there.
     
  6. juliang

    juliang

    Joined:
    Nov 25, 2008
    Posts:
    96
    Good idea. Couldn't find anything, though.