- Home /
can we attach a collider for each particle emitted by a emitter
hi to all.a group of clouds are being emitted by ellipsoid particle emitter.i want to detect collision to this clouds.i have tried various ways for detecting collision.the problem is when i attach a box collider to the cloud particles ,and when i move my (game object)cube(box collider attached)towards the clouds it is detecting collision bt it is detecting collision only if my game object is moved towards the cloud particle collider but not the clouds.here all clouds are separated with some distance.i want to let my cube to move across clouds when there are no clouds in front of the cube.as i attached the box collider it is detecting collision even though there are no cloud particles in front of my cube.to be specific i want collider to each particle that are emitted by the emitter.i have used world particle collider (checked 'send collision message')and added to the cloud particles(tried both ways of adding world particle collider to cloud particle which is attached to the empty gameobject and also adding world particle collider to the cloud particles alone) and also attached the below script`using UnityEngine; using System.Collections;
public class onparticlecollision : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnParticleCollision(GameObject other)
{
print("hit");
}
}` but nothing working for collision of the object with the cloud particles.any suggestions and ideas ??help me
Answer by Skyboard_Studios · Feb 16, 2014 at 12:46 AM
You should make sure you add the "World Particle Collider" with "Send Collision Message" set to on to the particle system.
source:
Documentation