Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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