Question by
Dgrohl91 · Apr 11, 2016 at 08:12 AM ·
unity 5triggerparticle system
Create particle onTriggerEnter for simulating a hit
I want to create a beat effect once my character attacks to an enemy. I want to do something similar to this effect:
https://49.media.tumblr.com/a83d0950c2fb9fa461fa91161d1378e9/tumblr_n3mv8nr1L21qh8rq6o1_500.gif
But I want to make shines instead of stars, you know, It's a very usual effect in games. How do I manage to do that?
Do I have to attach a particle system to the enemy prefab or instantiate one every time it got hit?
Thanks.
Comment
GameObject shinesParticles;
shinesParticles = Instantiate(Resources.Load<GameObject>("ParticleSystems/ShinesParticles")) as GameObject;
shinesParticles.transform.position = new Vector(0,0)
shinesParticles.GetComponent<ParticleSystem>().Play();
I assign 0,0 position but you will give according to you character position.
I hope you got it. :) @Dgrohl91