I have spent the last 2 hours trying to figure this out, and to be sincere, I’m feeling lost, frustrated and dumb.
As I said, I do not think I have the required knowledge to tackle this. If i do, I need some more information like in wich lecture it was referenced…
I tried filling the missing vector3 required in “GameObject vfx = Instantiate” with
other.ParticleCollisionEvent.intersection
ParticleCollisionEvent.[this, other].intersection
other.GetComponet().ParticleCollisionEvent.intersection,
other.GetComponentInChildren().ParticleCollisionEvent.intersection,
other.GetComponentInChildren(ParticleCollisionEvent.intersection)
other.GetComponentInChildren().emission.ParticleCollisionEvent.intersection,
other.GetComponentInChildren().GetParticles.ParticleCollisionEvent.intersection,
the best I managed to do was:
other.GetComponentInChildren().transform.position ,
and that just made the hitVFX appear on the laser emmiter, not at the particle impact position…
…
I read a lot of examples, re-read the API a hundred times, and I have no idea what I’m doing. I simply do not know how to reference it. (Should I put it into ? into( )? into { } ? State the object’s name and a dot after it? I need to reference only the gameObject emmiting the particle, or the object being hit as well? I need to set something public on another script?
All examples on the internet seem to create an array and I have not even a clue to why would I need an array. I don’t want the number of particles that hit, I just want the position… The variable “i” that I posted in my script was simply copied and pasted from the API’s example, as well as the list declaration in the beginning of the code…
I feel as if I’m being asked to write words when I’m still learning the letters.
You already helped me a lot, and I appreciate that, but if I am to solve this I need more… I’m sorry.
In the other games I made in this course the collision did not use the point of impact, just the fact that the collision had happened (we changed colors, disabled meshes…). The script for playing a particle effect was attached to the object containing the ParticleSystem, so it was easier to reference it as well, and we just needed the play / stop commands, not a waay to get th data from the particles themselves…