stagnant object in unity code example
Example: stagnant object in unity
Rigidbody2D rb;
void Start()
{
rb = GetComponent<Rgidbody2D>();
IsStagnant();
}
void IsStagnant()
{
if (Rigidbody2D.Isleeping())
{
Debug.Log("Object is not moving")
}
}