- Home /
OnParticleCollision
Hey guys,
I am trying to come up with a system to make my player character to burn, freeze, melt ... die in every way possible being hit by particle systems with different tags. So far, so good ... the only problem I am running into: I cannot send the particle system tag to the script attached to the player game object. Yes, OnParticleCollision is familiar, but it doesn't really help with that problem I guess. Any suggestions? Don't get me wrong, I know there are workarounds, but getting tags from colliding particles would be the direct way, as far as I understand. So ... any help IS appreciated :)
Wow! Excuse my french :) The first sentence is errr ... Sorry!
$$anonymous$$aybe you forgot to add a WorldParticleCollider ? And make sure you enabled "Send Collision $$anonymous$$essage". http://unity3d.com/support/documentation/Components/class-WorldParticleCollider.html
Answer by Eric5h5 · Feb 14, 2011 at 12:28 AM
I'm not sure why you say OnParticleCollision doesn't help; you can get the tag from OnParticleCollision (other : GameObject)
easily enough.
Hi, thanks. Sorry for the late reply to your answer. I know that it works that way around. What I tried was to acces the particle system tag from the script attached to my player gameobject. I would attach a script here, but I have written a different approach now. But if you could still help me with that question, it would really be appreciated. I guess I am missing out something big about scripting here ...
The OnParticleCollision function is attached to the player object, and other.tag tells you the name of the colliding particle system.
Your answer
![](https://koobas.hobune.stream/wayback/20220613104220im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Slow Particle Down Inside Collider 1 Answer
Unity Particle System collision detection problem 1 Answer
A limit to the number of tags? 2 Answers
Prticle collision point 1 Answer
Objects can't detect the tag of a tilemap collider? 1 Answer