Collision 中带有碰撞的信息,例如:速度和撞击到的点
void OnCollisionEnter2D(Collision2D coll)
{ foreach(ContactPoint contact in coll.contacts)
{
contact.point;//
} }
Collider是由影响的对象
void OnTriggerEnter2D(Collider2D other)
{ other.gameObject.transform.position;
}
Collider Collision Diff
时间: 2024-10-10 10:10:34