Particle Collision between particles
Hello there, I'm using Particle system to emit projectiles (i.e fireballs) but I don't know how to handle collision between two projectiles if they cross each other, is it even possible? Is "OnParticleCollision" gonna work with another particles? If yes then how should I reference them? Please help, thanks :) I did a little bit research but couldn't find anything what could help me out with this one.
Would that work if ins$$anonymous$$d of creating particle emitter and attaching it on the player I would create particle emitter without attaching it on the player and just place it where I was standing while casting a projectile then I would call Raycast from the emitter and if my enemy do the same the raycasts will collide and I would know that particles will cross each other. Does it make any sense?
I see that you ain't very helpful guys ;O Anyway I was experimenting with instantiating GameObjects with Rigidbodies and Colliders set to isTrigger in that way they can collide with eachother and I can catch up if they hit the enemy. Now I need to mix it with particlesystem somehow. Cheers
Answer by allenallenallen · Sep 21, 2015 at 03:47 PM
OnParticleCollision() doesn't work with particles colliding particles. I guess you can figure out the rest.
One thing though, particles colliding with colliders must have isTrigger NOT checked. Or else, that won't work.
I have a video for setting up OnParticleCollision(): https://www.youtube.com/watch?v=LEhOiLW_API
Use it to set up whatever you can think of.
Thank you for your answer, I figured it out that it ain't possible but I needed to give it a try. Anyway I have already seen your video :) also I know about isTrigger needs to be unchecked. I'm still going to use ParticleSystem but in my simple straight projectiles I will be casting isTrigger collider (without mesh renderer) at the same time with particle with the same speed and if colliders collide I will just destroy them and clear particles for that projectile (cd will be long enough to avoid destroying the next particle cast of the spell) $$anonymous$$aybe it's not the best solution but until I figure out the better one I will stay with this one. Cheers!
Answer by CybernetHacker14 · Oct 05, 2017 at 06:09 AM
Won't Trail Renderer work for this purpose? You just need to find the right sprite for the trail.
Your answer
Follow this Question
Related Questions
How do I make my particle system detect/mark a floor collision? 0 Answers
Can I shoot a ray from a particle that hit a collider? 1 Answer
Can't find a way to add particle effects to a collision 2 Answers
Spawn particles on collider surfaces in range 1 Answer
Particle Collision between particles 0 Answers