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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Re-apply physics after standing still?

Discussion in 'Physics' started by Nandos_ZA, Dec 15, 2017.

  1. Nandos_ZA

    Nandos_ZA

    Joined:
    Nov 16, 2017
    Posts:
    4
    Hi

    I hope someone can assist.

    I have a bunch of 3D objects that stack randomly after instantiated. The player can then remove objects at will, however if he/she removes one of the objects with others resting upon it, the top objects don't move. (Gravity appears to turn off if the objects become static?) Is there a way I can force gravity on again?

    Not even sure if that is the problem.
     
  2. KeithKong

    KeithKong

    Joined:
    May 31, 2015
    Posts:
    73
    The rigidbodies are sleeping. Until a force is applied (including collisions but excluding built in gravity and resting joints) the rigidbody does not process physically. You can also call Rigidbody.WakeUp.
     
    Nandos_ZA likes this.
  3. Nandos_ZA

    Nandos_ZA

    Joined:
    Nov 16, 2017
    Posts:
    4