Hit Effect on our Attack

<p>On our particle effect prefab, we want to add a sphere collider. Adjust the sphere collider to the size of the particle effect at your discretion.</p> <p><img alt="" src="https://miro.medium.com/v2/resize:fit:537/1*cbOpWEpXO4yVqnDj3qyTCg.png" style="height:355px; width:488px" /></p> <p>Once you have the collider set how you like, set the collider to &ldquo;Is Trigger&rdquo; because this will trigger the next effect on collision.</p> <p>The next step will be to create a new C# Script and we&rsquo;ll name it AttackHit. This script will be set up as a triggerCollider to instantiate the particle effect that will play on collision.</p> <p><img alt="" src="https://miro.medium.com/v2/resize:fit:527/1*1KpV-xHcDWrXfUZmnHlmsA.png" style="height:273px; width:479px" /></p> <p>I&rsquo;ve set the collider to trigger when it collides with the tag &ldquo;Enemy&rdquo; so we&rsquo;ll have to create a new tag in the Inspector and label it &ldquo;Enemy.</p> <p><a href="https://medium.com/@kennethmclachlan11/hit-effect-on-our-attack-4ab97d949d1d"><strong>Click Here</strong></a></p>
Tags: Effect Attack