Hello every one …
private void OnCollisionEnter2D(Collision2D col)
{
if (col.relativeVelocity.magnitude > 5)
Instantiate(FallDust, transform.position, Quaternion.identity);
}
i put this script in a multiple cars that keep falling from the sky and the code job is to create dust when its hit anything if the speed was greater than 5 and its works fine ,But even if the car was not moving and other falling cars with speed>5 hit it both cars will create dust the one with speed=0 and the other one with speed >5