Let's Build the RPG! - 23 – UE5 Niagara Fluids Fire Torch Effect Tutorial with Character Animation

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
ladies and gentlemen it is time to hold the power of ue5 in the palm of your hand let's get to it [Music] hey guys welcome to today's episode and i am really excited for today's episode because we are finally setting up our very first gameplay ability of our game and this is the first of many many many episodes on gameplay abilities because really it's just the tip of the iceberg on how we want our game to play the real question of every game is what will the player actually do in the game how will the game mechanics actually work so for this very first ability i'm envisioning this sort of like as a human torch ability so inevitably the players running into dark places in the game needs a way to be able to see what's going on so they light a fire directly in their hand and they can see that all around so it's nothing that's yet doing damage or affecting enemies or affecting the world but we will get there in the due course of time we're just starting out simple for our very first ability so there are really three pieces to setting this up so number one is activating and deactivating the ability so how do we turn on the ability how do we turn it off then comes the effect of the ability so what is it actually going to do and the last piece is the animation of the character tied to the ability so we're going to cover the start of all three today and in the last couple of episodes we covered niagara first because inevitably in any gameplay ability almost always you're gonna have some sort of effect and also in previous episodes we already covered stuff like how to activate or deactivate something like our walk run toggle that's in episode 4. so the last piece that we have yet to cover in this series is animation and we're not starting by bringing in a brand new animation that's going to be two episodes from now because in this particular ability they could have their hand kind of up in the air when they're doing other things like they're walking or running or they're jumping or they're just standing still and so what we really need to do is we need to modify existing animations in some way so what we're going to do today is we're only going to have to adjust two bones in the player's skeleton basically their upper arm and their forearm and we can adjust the position of those without affecting the rest of the animations going on for our character so there's a lot of new concepts that we're covering today if you've already watched the previous two episodes on niagara then you're already going to be familiar with a lot of the effects that we're doing so that's going to be easy but we're diving for the first time into animation all the stuff involving bones sockets the player's skeleton you're going to get an overview of all of that really this episode is intended as an intro to animation and unreal engine 5. so let's get to it so the very first thing we need to do to get this party started is we got to activate the brand new ue5 niagara fluids plugin so if you go up to settings and then plug-ins and we just search for niagara fluids and then you activate that we're going to need to restart the engine and you're all set to go so the niagara fluids plug-in it's really a lot more than just fluids because it's gases it's other substances like fire really it's any sort of amorphous substance and it's really versatile because the way unreal engine designed it is they designed 2d and 3d effects now the 2d effects they still look kind of 3d because they face the camera and in fact that's what we're going to use today i experimented with a 3d effect as well and it looks a little bit better potentially but the problem is that the 3d effects are much more performance intensive so unless you're rendering them as cinematics it's probably not going to work to have a lot of effects in your game so to start out let's navigate to our content drawer in the last couple of episodes i created this folder for niagara and i'm just going to create a new folder here for gameplay abilities and then we'll go into that and i'll create another new folder for aptly titled fire and i'm going to go ahead and give that a new color just so that it's more fiery let's say something like something like that there we go and if i go into fire here's where we're going to create a new niagara system and now to use the fluids you got to choose new system from a template or behavior example and we'll do next and then we have this entire list so we have liquids we have gases 2ds to start and then 3d and you could try all these out but they're much more performance intensive if you go into the 3d stuff and for this very first ability we're making i'm sticking with this grid 2d gas moving fire so finish and i'm going to title this torchlight underscore ns for niagara system we'll double click to go into that now these new fluid emitters they're really complicated so basically the source particles communicate into the smoke fire emitter and if you expand this it is huge it's got a ton of stuff going on here yeah it just goes and goes and goes so let's not expand it but luckily most of the things pretty much everything that i had to change i found in the emitter summary here and so what unreal engine does with that is they take all the most important features and they stick them in the emitter summary and then we have kind of an abbreviated list of the things that we might want to change in the emitter so the first thing we're going to do is we're going to go through all the settings in the system here just to get the right feel the right shape of the fire so that it's ready to tie it to the animation so if we navigate on the left side source particles to the spawn rate i'm just going to adjust this to be a little bit less than what it currently is so 300 the next thing is under initialize particle i'm just going to standardize the lifetime to be 0.3 and then to get this fire actually pointed upwards we're going to enable this add velocity and cone here and when we do that we see it kind of shooting outwards if we wanted to do a flamethrower maybe we could start with that but i'm going to navigate to add velocity and cones so the minimum is going to be 0 and the maximum instead of 1800 is just going to be 200 and then i also change this velocity distribution along cone access to be a higher number like 0.8 if you see here it says that higher numbers increase the likelihood of receiving velocity closer to the cone axis so that's upward and the cone access is upward based on the z that's here one thing is if you wanted the direction to be able to be changed based on the orientation of the system in the world like if i turn the fire in the world then instead of the cone access coordinate space being world here i would set it to local because the z-axis of the system would then be this way if i turn the system that way but because this is set to world any direction that i turn the fire z is still going to be upward because it's oriented by the world axis now we're going to change this fire to be a lot less wide we're going to bring it in so that it originates in a very small space right around the hand so to do that i'll go to sphere location instead of a radius of 50 i'm going to make this absolutely tiny so two and you see now that the origination of the fire is happening in that very small space like right there but the problem is that it's spinning all around so what's controlling that so that's the curl noise force here we're just going to tone that down quite a bit so the strength i'm going to bring from 130 all the way down to 0.1 and you see now basically it's straight up there's still some curl noise but not much and then the noise frequency i'm going to set to 0.05 so now we see the effect it's still curling a little bit but it's toned down quite a bit mainly it's just straight up now we got two settings we also got to modify under the grid 2d gas smoke fire emitter here and remember we can go right to emitter summary we can get all the most important stuff if we scroll down a little bit we got to get to this solver dissipation density and dissipation temperature so the dissipation density this controls how much smoke there is so if i make this a very small number 0.2 so it doesn't dissipate nearly as fast and then the smoke just lingers and lingers and lingers so if you want a really smoky fire that's what we can do but i'm going to up this quite a bit just so that there's a lot less smoke so 10. and then for the dissipation temperature the greater this is the less fire and the more smoke so if i make this like a hundred like yeah then there's a lot more smoke and there's less fire so basically dissipation density controls the overall effect so the smaller that is the more general of an effect you're going to have and then the dissipation temperature if you up that that's going to shrink the percentage of the effect that's fire versus smoke so i'll give you an extreme example here so let's say the dissipation density is 100 so it's a very big effect and then the dissipation temperature i'll set that to two so that's almost entirely fire right so it's got long thin strands of fire that goes up doesn't really look realistic but if i up this to something like a thousand it's going to be all smoke yeah so there we go so i see our smoke there and i could actually dissipation density set this down to like two and then yeah then there's just smoke smoke smoke smoke so yeah i'm going to revert that back to about 10 by 10 and that's going to give the torch light effect that i really want all right so we are all set with the niagara system i'm going to save and we'll close out of this so now the next step is figuring out where this niagara system is physically going to be attached on our character and at the beginning of this episode you saw it was like right on their hand so how do we attach it there so for that i'm going to use what's called a socket so the first thing you should do is navigate to your animation blueprint so for me it's under content underscore core because we sorted this in episode three so sockets are a way of specifying on the character's skeleton where do we want something attached or a series of things attached and we haven't talked about skeletons before but every single character in unreal engine is animated with something called a skeleton and you can access your mannequin skeleton really any character skeleton by going up here in the top right corner looking for the skeleton icon in skeletons and unreal engine are made up of what are called bones and each bone is attached to a specific location on that character and based on the rotation the orientation of each bone that controls how our character is moving at any moment in time on an animation we are gonna do a little bit of manipulation of two bones later in this episode but for now we're just setting up the socket so if you scroll down on the left hand side looking through all the skeletons bones till we get to the right arm yeah right about here so it starts with the clavicle right upper arm right lower arm right hand right and the reason we're starting there is because that's where we're attaching the fire to the player's right hand and if you select hand r right click and say add a socket and that appears all the way at the bottom here because what's also attached to the hand are all the fingers here and the socket has its own icon and it's titled hand underscore r socket and the thing that i want to show you if we readjust our camera speed to something a little bit lower we can get in very close and we can actually adjust the location of that socket so if you select the select and translate here and we can put that let's do that more kind of directly in the palm of the player's hand and by the way this is also exactly how you detach something like a sword or a bow and arrow or a gun to a player's hand so i'm going to position this socket as close to the middle of the hand as i can but a little bit out because anything that the player is manipulating in space with their hand it's not going to be directly on the hand it'll be a little bit removed from it and we can always come back in and change that if we want to change the position but that looks good to me and you could just analyze it from a variety of angles just to make sure it looks good we're going to save so now let's do the simplest possible setup let's just get the fire attached to the player's hand and then we'll go from there so if we go back to our third person character blueprint so not the animation blueprint but the actual character blueprint and on our event graph i'm just gonna zoom in and i'm gonna get this working with just hitting the number one on our keyboard but you could use any button you want so if you right click on the event graph and just type one so keyboard event one so what do i wanna do when i press the one on my keyboard so basically i just wanna spawn the niagara system for the fire and attach that directly to my player's hand so from the pressed execution pin here i could just say spawn niagara or spawn system attached and what are we attaching to so we're attaching it to our mesh so i can drag in a reference to our mesh and we're attaching it to a specific point on our mesh and what was that point it's hand underscore r socket i think this is case sensitive so make sure you get this exactly so the attach point name is hand underscore r socket the location and the rotation is just attached directly to the socket all this other stuff we don't need to worry about right now but let's select our template so if we go back to the content drawer let's go back to our content niagara gameplay abilities fire so that was torchlight underscore ns so torchlight and there it is so that's basically it let's compile and save let's test this out when pressing one alright so here i go and there's our fire and it even moves around when i run it's kind of susceptible to the velocity of things but we got a couple of problems right so hitting one again doesn't turn off the fire in any regard so that's one problem and then also uh we're not moving our hand in any general direction we're not moving it up we're not moving it side to side so it just looks like our player is in flames as i slowly run down the corridor so how do we fix all that so let's set up the toggle back and forth first the ability to turn it on and off and this is a little bit tricky because it's our third person character blueprint bp third person character here that's going to allow us to do the toggle but it's actually the animation blueprint that we're communicating to because we want it to do an animation right so the way i'm going to handle this is i'm actually going to set up a variable on the animation blueprint and the reason i'm going to do that is because that variable is going to control whether or not our player's arm is animated upwards or really any direction you want to animate it so to get that communication between our character blueprint and our animation blueprint we're going to set up what's called a reference because these are two blueprints that are going to be communicating constantly so every single time we communicate between these two blueprints i could cast you know i could do that casting every single time but what if we could just cast once we set up a permanent reference and then we could reference that every single time going forward so that's what we're going to do so if you scroll all the way up to the top so on begin play that's when we're going to do the cast we're going to have that reference past that point and then those two blueprints can communicate perfectly from that point forward so if we right click and we say event begin play and so how do we cast to our animation blueprint well our animation blueprint is connected via the mesh and then from the mesh we get the anim instance because if you remember i showed this earlier if i go over to the mesh that's where it's attached right here the anim class and then from the atom instance that's exactly where i can cast directly to this blueprint so i can drag off a pin here and cast to abp yep third person character and connect this up and then as abp third person character i can right click on this and say promote to variable and so if the cast succeeds then it sets this variable right here and instead of as abp third person character i'm just going to rename that as an mbp reference and i'm also going to put that under a category of references and basically that's going to be a category of variables on this blueprint for any other class any other blueprint that i need to communicate to so you're going to see the reason that we did that in just a minute but if we go back over to our animation blueprint so here is where i'm going to set up a new variable and the variable is basically going to be right arm holding up like do we want that arm to be held up or not so under variables here i'm just going to hit plus and we're going to call this right arm holding up and this is from a previous episode but this activated jump land effects i'm just going to put this under essential movement data here all right so we have our right arm holding up variable so this is going to drive the animation but we won't set that up quite yet let's compile this let's go back to our third person character blueprint we'll come down down down down here and i'll make some space by moving out the spawn system attached now because we have the reference we don't need to cast to that animation blueprint so we can just get a reference and then from that reference we can just drag out a pin right arm and we can get that variable and so the reason we're doing this is because if the right arm is being held up then we want to put it back down we want to turn off the niagara system and if the right arm is down currently then we want to hold it up so we could set up a branch and connect that up so if the right arm holding up is false that's when we want to spawn the niagara system here i'm just going to drag this down now if it's true what do we want to do so we want to make this a toggle right so we want to turn off the fire if it's true so how do we then turn off this so to do that we need to make this into a variable that we can reference so i can right click on the return value promote to variable so then on that new component i can just right click rename we're going to call this the active niagara system and it's possible in the future i might have more than one active niagara system but for now we're just gonna have one so that's what we'll name it so now that we're making a variable for this niagara system the second it's spawned then we can reference it and then we can basically destroy it destroy that niagara system so i can drag in a reference get and then i can say destroy component and then i'll connect up our true pin to that and let me run through the logic here very quickly so here's what's happening i press one right arm holding up if it's true we're going to destroy component and if false then we're going to spawn the component we're going to spawn the niagara system but the other thing i need to do here is when it's set to false i need to switch this to true because otherwise this variable will never change and it'll always be false so then if i move over to the right hand side i can just drag in a reference again and now we're going to set the holding right arm holding up and then this is going to be true right and then in this case i can just copy and paste it up here in this case it's going to be false again and so that should work as a toggle so at first it's false it spawns the fire and then it sets this to true and then if i hit one again then it's true and then it destroys the fire and it sets it back to false so let's compile and save let's give this a whirl all right one there's our fire one again fire's gone one one one one cool all right so now we get into the complicated part and also the kind of fun part because we could do all sorts of stuff with what we're about to get into so how do we make the player's arm actually go up when the right arm holding up is true and so for this we got to get into some functionality we have not yet covered in this series so if you go back to your animation blueprint so if you've been following this series you're already familiar with the animation blueprint event graph and we're not going to have to touch the event graph at all today in our animation blueprint so everything that we're going to do today actually takes place instead in what's called the anim graph so if you double click on that on the left hand side so the atom graph is what makes the animation blueprint the animation blueprint it's what brings together all the different pieces of animation to create what's called a final pose or an output pose and so the primary pieces of that are the animations themselves but then on top of that we can manipulate bones we can do other things like this control rig ik tray stuff if you've noticed our player when he's stepping on stairs like one foot could be higher up than the other they're not actually evenly spaced so that's being controlled by the ik trace here but back to the atom graph here so it's figuring out our final output pose in every single instant every single moment of the game and it's using what are called state machines which are various collections of animations that represent a particular state so if i go into main states for example so we have this fall loop right because there are different animations that are involved in falling you have the initial jump and then you have like uh i'm following i'm falling and then you have a land animation and so then we have a two land and then a land and then it goes back to a regular locomotion all these different nodes all these different animations and atom graphs they have different logic that connects them so if something is true then it goes so is falling then it goes into the fall loop for instance and we're going to get into all of this in earnest in about two episodes because that's when we're actually importing new animations from outside into our character but for now we're going to focus on what animations we need to modify such that the player's arm is going to be extended upwards when that fire is activated because i want this ability to be activated when the player is just standing still but also when they're walking or running right so the animations we really need to manipulate are the walking and running and all of those are under locomotion actually if we go back to the atom graph and then we just go to the locomotion state machine here so this is very simple we got our idle and then if the character should move then it goes to walk run and then if they should not move it goes back to idle so let's start with our idle animation so we'll go into that node and this is just playing our idle animation sequence over and over and over it's set to loop over here and we see our character just idling by and so because we're not creating a new animation we're just modifying an existing animation what we need to do is make some space here and we're not actually modifying the animation in the animation itself because then we'd go into the animation editor and we could do some things there we're not doing that what we're doing is when this animation is playing if something is true meaning if that right arm holding up variable is true then we want the arm to actually move up so in this we just want to modify the behavior of two bones basically it's our upper arm and then our forearm and so to modify the behavior of specific bones we need to drag out from this and we need to say local to component and it goes right back component to local and as this stands if i compile and save it basically does nothing so it goes to individual components and then it goes back to local but nothing happens and you heard me say we only want to modify two bones so what i can do is drag out a pin and i could say modify transform modify bone now before we do any modification whatsoever what's actually controlling this modification it's whether or not this variable is true right so in that case i can just drag in a reference and normally i would just hook this up here but the problem is that's a float variable so we need to change the alpha input type from a float to instead be a bool and then we can connect this up so basically if this variable is true then we're going to transform modify a specific bone right now it says bone none we haven't chosen what bone we're going to modify but if we go back into our skeleton here so remember i was talking about clavicle right upper arm right let me zoom out here so you could see and i did a lot of experimentation with this basically it's a trial and error but the only bones we need to modify here are the upper arm and the lower arm so if we go back to our third person character animation blueprint go back to that node so the bone to modify we can just scroll down there and under clavicle r choose upper arm r now we could do all sorts of things with this bone we could physically move the bone to a different location that's the translation i could say well the arm is actually out here and that has all sorts of effects of stretching skin it just looks all sorts of wacky so i don't recommend doing that so we're keeping that under ignore and then scale same thing now you could do some crazy things here like you could slowly scale up the bones over time so the character like morphs and changes into the giant hulk or something like that but i don't recommend doing that unless you're experienced with that sort of thing but the basics today we're starting with rotation because really that's what's changing the rotation of the upper arm relative to its parent bone the clavicle that's what's moving up and so if i select that node and then under rotation we're going to say instead of add to existing which is whatever the animation's already doing with that bone we can add some additional rotation to it but instead of that i'm just going to say replace existing and we're going to keep this component space here now i had to play with this quite a bit because the y i think is the upward movement of the arm and the x is this way and then the z is like the curving inward kind of like the the turning of the arm and so what we're going to set this to is 90 negative 20 and then negative 60 for the z and i'm going to drag out make some more space i can copy this node paste it again i'm going to change this one from upper arm r to lower arm because we also need to modify the lower arm i need to connect this up because we're modifying two different bones and then for our right arm holding up variable i'll connect that to that note as well just going to move the positioning here a little bit put in a reroute and the rotation here is going to be a little different so it's going to be negative 110 negative 130 and 90. now you can experiment with changing these values and seeing how that rotates the arm but i just had to do a lot of trial and error until i got this looking as best i could so make sure your boolean is connected up to both nodes make sure your bones are updated make sure your rotations have the right values and then if all that looks good let's compile and save so all this is flowing through looking good let's test this out all right moment of truth there we go and there's our fire coming out of the hand and then if i want to disable it one again and it's disabled but we've got a few different issues here so one seems to be it seems to be switching from one to the other instantaneously which is not too natural right maybe a robot even a robot can't move that fast and then the other is that the positioning of the flames a little bit off so let's solve both of these so regarding the positioning of the flame so what i'm going to do there is i'm going to go back into the skeleton i'll come down to the socket so we find our hand our socket there and we just got to move over into position and the reason that's happening is i need to place it kind of in the middle of the hand so this is really up to you but i'm going to actually place it like physically in the middle of the hand if i were making a game where the player would have like a gun sword etc then i would probably place it where i just did like a little bit out here but because i'm not doing that i haven't really revealed the full extent of what we're doing in this game i'm going to place the socket kind of right square in the middle of the hand the power is going to originate right in his hand and to fix the other problem which is like the instantaneous hand raise so how do we give that a little bit of a delay so if you go back into your animation blueprint back into these two nodes on the right hand side under details if you expand blend settings we have a blend in time and a blend out time so this is how long it takes for this variable to like turn on the effect and so instead of being instantaneous i'm going to make this 0.3 seconds so a little bit less than a third of a second the way i got this is i basically tried out different settings but you got to think like how long realistically does it take you to raise your arm even if you're raising it fast it's probably about a third of a second compile and save so let's try out these two things so now we're ready and the fire is still a little bit staggered off but we look at the hand and it looks like the hand raises and lowers a little bit more naturally right so the last thing i did from a positioning standpoint if i go to the third person character blueprint again so instead of putting the location just at zero zero zero i just made the z negative twenty and that lowered the effect a little bit closer so into the player's hand instead of above it and so now yep so now the fire's basically in the player's hand there it's originating from the hand but the problem remains that when i'm running yeah his hand's just all over the place he's not really holding the fire out in any regards now if you like that effect that's pretty cool like running in and through the fire and you can keep it just as is but i would prefer that he maybe runs with his hand out a little bit kind of like holding up a torch and so if we go back to our third person character animation blueprint so we already modified the idle animation sequence but we also need to modify if we go back to locomotion here our walk run sequence so back in the idle what i'm going to do is i'm just going to copy all of these so just highlight control c and then we'll go into the walk run and we'll do the same kind of thing so i'll split this up and i'll paste it in and move it out a little bit further and then connect these up so again i tested this out and if you're running with it kind of straight in your face it looks like the fire's blowing in his face not a realistic thing so i just moved his arm out a little bit so the rotation here instead of negative 20 this is going to be 10 and instead of negative 60 this is going to be negative 30 and for our lower arm remaining exactly the same so compile and save let's do one last test all right i activate the fire i'm running yep he's still holding it and it's holding kind of directly to the right of his head and then i can deactivate while walking i also thought about setting this for other animations like jumping but it seemed to me to be totally normal to keep his hands kind of doing what they're doing even if he's got a fire burning on the side of his body there but there's one thing about it that i kind of don't like which is the fire seems to light instantly automatically the second he moves up his hand and i think it should take a little bit of time so let's set up a delay there so back in our third person character blueprint so over here we're going to run into some trouble with the delay so i want to show you how to solve that but first i'm going to show you the problem so let's do a delay and we'll wait 0.2 seconds before the effect compile and save we'll test this out so there are a couple problems so i hit 1 and it takes 0.2 seconds before the hand actually raises so it doesn't solve the problem we need to raise the hand before we actually play the effect so to do that i basically need to reorganize this i need to set this variable to be true before the delay so all of this stuff i need to drag this out and then for this variable i need to set that to be true first because that's what controls the hand actually moving up compile save will test it again so at first glance that looks pretty good right so i lower the hand i raise the hand lower the hand or raise the hand the problem is if you spam one over and over and over again so if i do so then i can't even turn it off anymore and then i also get this error saying that niagara component 2 is not valid and the reason that's occurring is because if i spam it repeatedly what happens is this gets set to true and the niagara system never spawns and it's trying to destroy something that never spawned so what i'm going to set instead of a regular delay we're going to do a different kind of delay here which is called a re-triggerable delay and the re-triggerable delay it basically works to prevent this sort of thing because if the same path is taken within the 0.2 seconds it basically resets the timer so it sets it back to 0.2 seconds but the other thing i found that always ensures that this active niagara system is never attempted to be destroyed if it doesn't even exist is that we can change our branch logic here so instead of assessing this variable what we're going to assess is whether that active system is actually active get active niagara system and we can say if it's valid so function is valid and if it is valid meaning this system exists then do this and only attempt to destroy it if that indeed exists but if not then keep going down this route so in combination with that retriggerable delay what's going to happen is nothing because here's what will happen so you spam one over and over and over it starts the animation up and then it starts going here but it never gets there because every single time you spam this and it hits this it's saying false because there's no component to destroy yet and so it keeps going keeps going and then it keeps retriggering this and the thing never spawns so you're basically preventing the player from spamming spamming spamming and ability compile save will test this out one last time alright moment of truth so turns off turns on turns off turns on but if i spam it the arm is raised but no ability only when i stop spamming it does it turn on so there are four final issues with this three of which i know how to solve but one i do not and for that one i am basically going to ask the audience if anyone out there has any ideas but let's cover first the ones i do know how to solve and the first we're not going to solve this episode but we are in the next episode and that is the fact that the player's hand can go straight through the pillar there and the solution to that is something called inverse kinematics or ik for short and what inverse kinematics is is it's basically animation based on the object that's being pushed up against instead of the character themselves but there's two other problems going on here and you might have noticed it so the hands kind of shining through the fire at certain times which is really an effect i don't like and then also there's no collision on the fire so you see the fire actually like passing through the pillar there and then it comes out the other side obviously that's unrealistic now that's partially going to be solved with the inverse kinematics solution but only partially because the player's hand could still be on the side of the pillar like it is here and then the fire is still going through the pillar so the way we solve those two problems one with the hand showing through the fire and then the other with the fire particles just going straight through whatever object they're touching is we need to activate collision on the system so if you go back to your content drawer if you go into niagara gameplay abilities wherever you save that system we're going to go back into that so there's not that much documentation on this but i did find just enough to solve the issue so if we go into emitter summary here in the second emitter there's a whole section on collisions right down here you might need to scroll down a little to see it and right now use depth map collisions is set to checked i'm not sure why that's not working in my world so if anyone has any ideas on how to make depth map collisions work i'd be all ears but what i did find is if instead we use particle collisions so i'm going to check that here and then i'm going to uncheck use depth map collisions and open boundary up and i know i'm kind of blocking the view here so let me make this a smaller window so you could see it so if you come down after you check use particle collisions and uncheck those other two here we've got to put in an emitter name and all i did is i put in the same name as our emitter up here it's got to be verbatim so grid 2d i don't know if it's case sensitive or not but i'm just making sure i get all the capitalization right and then tab and then it's working so i can hit save and let's just try that out so now as i'm spinning around i'm not seeing the player's hand anywhere through the fire so we're not having that weird effect which i really really like obviously then if i hold the hand up next to the pillar so right next to the pillar you won't see the fire kind of going through the pillar and coming out the other side it still kind of brushes up against the pillar you see that but it's not actually going through and coming out the other side it seems a lot more accurate to me that there's actually a pillar there that the fire is colliding against it will solve the ik problem next episode one thing i did notice is that turning on this kind of collision it lowered my frame rate by about three to four fps nothing too significant but something to keep in mind now the last problem that i don't know how to solve that you might have noticed already is that regardless of how far back our scene goes it's still lit in the same way so that's a really long tunnel there it's still completely lit up by the fire in the distance and if i go very close instead you know it's still lit up just about the same so i've been thinking about this and honestly i might just consider this a feature of the game i'm looking to make rather than a bug because in effect it means that this torch light acts like a flashlight because it shines into the distance now this is some speculation on my part but i think the problem has to do with the fact that the particles don't know how far in the distance the meshes the scenery in the background actually is because it's just seeing the stuff on the screen in a 2d space i don't think it's communicating back to the cpu to see that but if someone has a solution to this or if at least you know the cause i'd be really grateful to know more so if you could post in the comments below that would be awesome for sticking around to the end of the episode i just wanted to give you guys one last bonus effect so if you go back into your emitter and i found this when i was just playing with it but it's a pretty neat effect so if we turn on the sprite renderer under source particles here and save and now let's play i'm calling this the molten fire effect because check it out if i hit one it's almost like i got lava burning in the palm of my hand i could almost envision the player as like this energy being kind of reaching through like a metal door and just melting it with his bare hand it's something i might actually use in my game but i figured i'd show it to you so that concludes today's episode guys and i hope to see you in the next one you
Info
Channel: NumenBrothers
Views: 14,188
Rating: undefined out of 5
Keywords:
Id: yc2pSuIgYRU
Channel Id: undefined
Length: 33min 52sec (2032 seconds)
Published: Sat Jul 30 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.