Yes. I do. Kindof. I got particles working. Maybe you can adapt this for your needs.
I JUST got it working after several attempts over the past few years. And if you have been through the available tutorials carefully and understand flex and the unity particle system, this will all make sense to you;
Set up a flex actor container gameObject, add Flex Source Actor component to it.
On the flex source actor component check ‘fluid’ at a minimum. Configure like for your needs or like the tutorial.
Attach the ‘flex particle controller’ component to it.
Add the particle system component to it and configure;
Might want to set up a material or something, up to you.
Check ‘Collision’.
Under collision select “World” as the "Type. Leave defaults for now.
Check ‘send collision messages’.
Now the way that this works is not like you might be used to. A gameobject does not know that a particle hit it, but a particle system knows which gameObjects it hits.
Attach the script below to your flex actor gameobject.
The script will be logging the names of gameObjects with colliders hit by the particle system. You should be able to handle messaging, destroying or the collisions with those gameObjects from here. Don’t forget you have many more particle collision settings, scale settings for particle size, you can make some super wicked stuff with this!!!
see also;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class ParticleCollisionDetector : MonoBehaviour
{
public ParticleSystem part;
public List<ParticleCollisionEvent> collisionEvents;
void Start()
{
part = GetComponent<ParticleSystem>();
collisionEvents = new List<ParticleCollisionEvent>();
}
void OnParticleCollision(GameObject other)
{
Debug.Log("THIS PARTICLE SYSTEM HIT:" + other.name);
// int numCollisionEvents = part.GetCollisionEvents(other, collisionEvents);
// Rigidbody rb = other.GetComponent<Rigidbody>();
// int i = 0;
// while (i < numCollisionEvents)
// {
// if (rb)
// {
// Vector3 pos = collisionEvents*.intersection;*
// Vector3 force = collisionEvents_.velocity * 10;_
// rb.AddForce(force);
// }
// i++;
// }
}
}