Collider Collision Diff

Collision 中带有碰撞的信息,例如:速度和撞击到的点

 void OnCollisionEnter2D(Collision2D coll) 
{
       foreach(ContactPoint contact in coll.contacts)
   {
         contact.point;//
   } 
   }
 

Collider是由影响的对象

 void OnTriggerEnter2D(Collider2D other) 
{
      other.gameObject.transform.position;
}

你可能感兴趣的:(diff)