Search Unity

Rigid body sleeps

Discussion in 'Physics' started by unity_Zwp_SrEj6UI-Tg, Sep 16, 2019.

  1. unity_Zwp_SrEj6UI-Tg

    unity_Zwp_SrEj6UI-Tg

    Joined:
    Sep 16, 2019
    Posts:
    1
    Hi, everyone!

    I have a question. When my characters (which is rigid body) collides with enemy (which is rigid body too) and character continue to collides with enemy for some time than enemy stops and don't react even while I try to change his velocity (simply freezes) until chatater stop collides for some time and than collides again. It looks like rigid body sleeps... Why does it happens?

    Any ideas?
     
  2. Adien22

    Adien22

    Joined:
    Aug 19, 2019
    Posts:
    44
    You'd need to post some of your scripts so we can see whats happening
     
  3. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,632
    Your ideas should be using Debug.Log() for anything including checking if it's sleeping. This will enable you to eliminate things like sleeping (it's extremely unlikely).