Create Hit Impact Effect - Unity Game tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] [Applause] [Music] [Music] in this video we'll show you how to use unity's particle system to quickly and easily make it hit impact effect along with the hit impact we can also use the same techniques to make many different kinds of effects such as gun muzzle flashes sword slashes an rpg spell effect and many other kind of particle effects that quickly appear then disappear in your game to make this effect we simply need the particle system and a few sprites which you can create on your own or use the link in the description to download all the free sprites we created and used in this video for this effect let's begin by right-clicking in our hierarchy and under effects we'll find and click particle system we'll see when we do this unique creates a game object with a particle system component and we'll name our new system hit particle effect first let's go to our emission settings within our particle system component and let's change our rate over time to 0 and click our plus button to add an emission burst by doing this we can see that instead of our particles constantly coming out of our emitter all of our particles are emitted at once the amount of particles that are emitted are based on our count so let's change our count from 30 to 1. and let's also uncheck our particle system shape option which can control the direction and way that our particle is being emitted next let's adjust our starting speed from 5 to 0. we can see by doing this our particles no longer moves up and stays in its starting location throughout its lifetime we'll next change our duration from 5 to 0.7 in our starting lifetime from 5 to 0.12 doing this we can now see our particle appears and then quickly disappears lastly we want to change our starting size from 1 to 1.5 the particle tab in our scene view can allow us to stop pause and reset our particle system within our editor it will also allow us to see our particle system using different playback speeds as well as the particle system's playback time with our particle system pause by left clicking and dragging over the playback time we can scroll through our particle system and see how it displays at different points during its lifetime next let's enable the particle size over lifetime setting and we'll adjust a curve so a particle starts small then grows larger throughout its lifetime on screen and to make our particle appear as it's quickly fading away rather than simply disappearing from our player's screen let's adjust our color over lifetime setting by clicking its gradient tab we can bring up its gradient editor by moving our gradient arrows we can adjust how and when the gradient blend appears clicking the bottom arrow will allow us to adjust and set the gradient's color while clicking the top arrow will allow us to adjust and set its alpha by clicking the empty space along the top and bottom of our gradient we can create a new arrow which we can use to add or adjust the gradient's color or alpha so let's adjust our gradient so that our particle is transparent at the end and beginning of its lifetime next let's add our hit effect sprite to our particle to do this we'll need to create and use a new particle material so let's right click in our project window and under create we'll select material with our new material selected within the inspector we'll click our shader drop down and under particles we'll select standard unlit and let's add our hit sprite 1 into our albedo map with our hit particle effect selected let's add our new material under the render settings we can see now our particle sprite is the sprite of our hit material however it still has a black background that can be found in our image texture to fix this we want to select our material and under our render mode we want to change opaque to additive at this point we can now adjust our color mode and choose between multiply overlay and color and we can also add our hit texture into our emission and to adjust the color of our hit particle instead of adjusting the color tint or the emission tint within our material we can simply adjust the color of our particle system's start and color since we only want this effect to happen once per particle system lastly we want to uncheck loop and then we want to change our starting rotation from constant to random between two constants we can do this by clicking the arrow to the right of the value then selecting random between two constants for our values we're going to use 0 and 180 degrees this will allow a particle to appear different ways each time that it spawns on the screen we'll need to next make another particle system for our next overlaying effect but since many of our values will be the same as this particle system instead of starting from scratch let's simply use ctrl d to duplicate our new particle system and place a new game object as a child of our first particle system let's start by creating another particle material for a second hit sprite and place that material in the render material value of our new particle system next let's adjust our max particle size which can be found in the render section of our particle system from 0.5 to 2. and let's also do this for our original particle system as well for our new particle system we simply want to change our starting size from 1.5 to 2 and the second constant of our starting rotation from 180 degrees to 600 degrees let's also enable our rotation over lifetime and we're going to set our angular velocity to 600. from this point we can make any small tweaks that we feel need to be placed within our secondary hit particle system with that complete let's create another secondary particle system that we'll use to create a small hit particle spark effect after the impact of the hit let's duplicate our second particle hit effect and let's remove our material and instead use our default particle material and under our particle's emission setting let's change our account from 1 to 80. let's also change our intervals from 0.01 to 0.015 let's next change the second constant of our starting rotation from 600 to 360 degrees and our starting size from 2 to .05 let's set our starting speed as well as our starting lifetime to random between two constants and for our starting speed we use the values of 20 and five and for our starting lifetime we'll use the starting values of 0.1 and 0.15 and let's also enable shape for our emission and we'll adjust that from a cone to a sphere and we'll also need to decrease the size of our radius next let's disable our size over lifetime setting and we'll enable our size by speed let's also disable rotate over lifetime and we want to enable our particle system trails at the moment our particle system trails appear as purple lines that appear to connect our emitter to the spawn particles in our scene the reason for this is we need to add a material in our render settings for our new particle trails to do this we can simply go in our render setting and under our main material you'll see an empty material slot for our trails material so let's add our default particle material into the empty trails material slot under the material settings let's also change our render mode from billboard to stretch billboard and with our stretch billboard render mode now selected by adjusting the length scale we can now adjust the length of our particles additionally by clicking our trail settings drop down we can also adjust how our trail appears and acts on screen at this point we can see by using unity's particle system in only a couple sprites we're able to make a convincing hit impact effect that we can easily adjust to use in many different games and scenarios with that said let's use the techniques we've learned to add a few more dynamic elements to our hit effect [Music] so so do so [Music] don't forget to subscribe and hit that notification bell to be the first to see this and many other tutorials game development tips and free game asset giveaways
Info
Channel: Game Dev University
Views: 18,485
Rating: undefined out of 5
Keywords: unity tutorial, how to create game effects, how to create a hit effect, fighting game hit effect, how to make a fighting game, Hit Effect, Game Effects, unity hit effect, unity game effect, unity hit particle effect, unity hit, unity impact effect, Fighting Game tutorial, fighting game in unity, unity street fighter, unity fighting game tutorial, how to create a fighting game in unity, fight game unity, unity particle tutorial, game dev university, Unity Game tutorial
Id: rB7yA2P8xT8
Channel Id: undefined
Length: 18min 5sec (1085 seconds)
Published: Mon Sep 27 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.