How can I change the scale of a GameObject through collision of particles with that gameObject?

Hi!

I’m working on a project based on several mini-games, developed in Unity5 and I ran into an issue concerning particles and particle collision. My goal with one of the mini games is to water a plant in a garden through the movement of the player (using KinectV2 sensor) but what I can’t get done is the scale increasing on particle collision part. I want the flower to grow once the water particles have collided with the 3d collider attached to that flower, and this to several other flowers in the garden. Also, I’m using the “Hose” particle system provided in the Standard Assets from the Asset store since it had the exact image I was looking for in terms of water coming out of a garden hose.

This is the script I wrote while watching several examples of using particle systems colliding with objects in the scene, although, from the many tries I have done, nothing seems to work…

public class Flower_growth : MonoBehaviour {

// --------- OnParticleCollision Method -----------//
public ParticleSystem Water_jet;
List<ParticleCollisionEvent> collisionEvents;

void Start()
{
    collisionEvents = new List<ParticleCollisionEvent> ();
}

void OnParticleCollision(GameObject other)
{
    ParticlePhysicsExtensions.GetCollisionEvents(Water_jet, other, collisionEvents); // (Particle emitter, objeto colidido, lista de colisões)
    Debug.Log("Collision");
    for (int i = 0; i < collisionEvents.Count; i++)
    {
        IncreaseFlowerSize(other, collisionEvents*);*

}
}

void IncreaseFlowerSize(GameObject other, ParticleCollisionEvent particleCollisionEvent)
{
Vector3 TargetScale = new Vector3 (20,20,20);
if (other.transform.localScale != TargetScale)
{
other.transform.localScale += new Vector3(1, 1, 1);
}
}
I will attach 2 images below: one for the general image of the water colliding with the flower collider that I want and the other showing where I attached this script, in the “Hose” Game Object from the folder provided in the Asset store.
Can someone please help me on how I can go about this?
Thank you so much in advance and sorry for the long post[113445-location-of-flowergrowth-script.jpg|113445]*
[113444-img1.jpg|113444]*
*
*

Edit:

I updated a script a little bit and found out that it has to be attached to both the particle system and the flower gameobject so that the collision between the particles and the flower can be detected. I don’t know if this is right but here’s the edited script:

void OnParticleCollision(GameObject other)
{
    ParticlePhysicsExtensions.GetCollisionEvents(Water_jet, other, collisionEvents); // (Particle emitter, collided object, collision list)
    Debug.Log("Collision!");
    for (int i = 0; i < collisionEvents.Count; i++)
    {
        Debug.Log("Collision 2");
        Rigidbody flower_rb = other.GetComponent<Rigidbody>();
        if (other.tag == ("Flower"))
        {
            Debug.Log("Found Flower");
            if (other.transform.localScale != TargetScale)
            {
                other.transform.localScale += new Vector3(1, 1, 1);
            }
        }
        
    }
}

Both the collision logs are coming out of the console but the “found flower” one is not.