I’m working on a turret asset script update, and trying to add a particle turret to the list of features.
I have the script on the parent, and a child game object with the particle system. I put OnParticleCollision() in the parent script, but its not detecting collision of the particle system, because its on a child gameobject.
It only works if I place the script with OnParticleCollision() on the gameobject with the particle system, doesn’t work if its a on a parent. I assumed it would work, because that’s how regular compound colliders work.
The turret script has to be on the parent, and the particle collider will in most cases have to be on a child. And for simplicity’s sake, I’d prefer to avoid splitting the script into two pieces just so I can have a few lines of code about particle collision, somewhere down the hierarchy on one of the child gameobjects. So can this be done somehow? Keeping the script on the parent, and detecting collisions of the child particle system?
PS. Alternatively maybe being able to adjust the particle start position through script would be good too, then the particle system won’t have to be on the child game object, but I don’t see that option in the documentation.