THE ANSWER:
There are many many complicated work-arounds and hacks online. After many hours of research into the topic, it appears that inside the particle system is the module: Triggers.
Inside of that module, You can clearly see that you can have the ability to interact with colliders set in the LIST.
The Downside is, that you have define which trigger colliders you want to interact with. Right, now, I just click the (+) and added the Terrain. Although, I am sure later, you might want to add a script which can automatically define all the different colliders you might have which we can collectively call “The World”
In my setup, this “FlameThrower” particle prefab will be instantiated when the player press the correct button. Because I don’t want a bunch of prefab references I also added the “Particle-GroundFire” as a child, but I disabled it. —>Picture Attached
[193507-flame-thrower.jpg*_|193507]
FIRST, we will adjust the Trigger module on the main particle system (In my case that is named “Particle-Flame”. So, after updating the LIST of colliders go down and set the Enter Trigger to “Callback”.
[193508-triggers.jpg*_|193508]
NEXT, I make sure this particular spell thingie, has a layer called “Spell-ToWorldOnly”, and then edit the project settings so that the physics truly only interacts between this spell-toWorldOnly and World (of which terrain is part of it).
NEXT, The when/what/why/how comes next! We will add trigger-script to the “Particle-Flame” which collides with my world, so that it know how to instantiate the object. The “when” is defined in the above mentioned trigger module of the main particle system.
Again, you can see now why I made the sub-emitter called “Particle-Groundfire” initially disabled. Because, I just want to drag it into the script inside of the editor window without referencing an additional prefab.
CREDIT must be given to the original Unity manual listed here as reference:
[Unity Manual: Particle Systems Trigger Module][3]
Here is my slightly modified script which is attached to the main particle system called: “Particle-Flame”
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ParticleTrigger : MonoBehaviour
{
public GameObject groundFire;
private ParticleSystem ps;
private List<ParticleSystem.Particle> enter = new List<ParticleSystem.Particle>();
void OnEnable()
{
ps = GetComponent<ParticleSystem>();
}
void OnParticleTrigger()
{
// CODE WILL ALWAYS BE RUNNING CHECKING FOR TRIGGERS
int numEnter = ps.GetTriggerParticles(ParticleSystemTriggerEventType.Enter, enter);
// iterate
for (int i = 0; i < numEnter; i++)
{
ParticleSystem.Particle p = enter*;*
-
GoInstantiate(p.position);*
-
p.startColor = new Color32(255, 0, 0, 255);*
_ enter = p;_
* }*
* }*
* void GoInstantiate(Vector3 position)*
* {*
* GameObject tempObj = Instantiate(groundFire);*
* tempObj.SetActive(true);*
* tempObj.transform.SetParent(this.transform);*
* tempObj.transform.localPosition = position;*
* }*
}
_*
_*
_*[3]: https://docs.huihoo.com/unity/5.4/Documentation/en/Manual/PartSysTriggersModule.html*_