Question by
unity_ZYsHk4nnsD81HQ · Oct 04, 2021 at 06:08 PM ·
c#instantiateparticlesunityeditorparticlesystem
How to Instantiate decals where particles from particle system hits?
I want to Instantiate decals where particles die or collide but I don't know how to do so, I have decal ready but have no idea how to write code about particle system.
dsasdaasd.jpg
(268.4 kB)
Comment
Best Answer
Answer by Tanoshimi2000 · Oct 04, 2021 at 09:30 PM
In your ParticleSystem, you need to enable the checkbox for Collision. Then check out: OnParticleCollision. In that event you can Instantiate a GameObject that contains the texture/decal, and then set the new GameObject's Transform's position and rotation to match the point of collision provided in the intersection property.
Your answer
Follow this Question
Related Questions
Particle Collision between particles 2 Answers
How Play and Stop a ParticleSystem through Scripting? 9 Answers
Particle System Help. 1 Answer