首先给粒子加上World Particle Collider,然后勾上sendCollisionMessage
然后用function OnParticleCollision (other : GameObject)
{ var body : Rigidbody = other.rigidbody; if (body) { var direction : Vector3 = other.transform.position - transform.position; direction = direction.normalized; body.AddForce (direction * 5); }}
接受碰撞信息,要注意的是,被粒子碰撞的物体需要加collider