When checking the velocity of an object with ...velocity.x == 0 && velocity.y == 0 everything works fine but if i use Rigidbody2D.IsSleeping there seems to be a small delay?
if (rb.IsSleeping)
{
// Calls after the rigidbody has stopped moving +0.2 - 0.3s
}
if (rb.velocity.x == 0 && rb.velocity.y == 0)
{
// Everything works fine but for reasons i can't use this
}
↧