Unreal Engine 5 || Free-Flow Combat System Series|| Part-5 || Using Motion Warping for Attack Anims

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone so in today's lecture uh what I think I'll be doing is uh adding a fluid animation system before I go and do something else uh I know I I told you guys that I'll be looking into the hit uh Collis system but I played the Arkham game Arkham night again to see how actually it works and what it seems is more like like uh it matches the animation like the exact place where the hit uh animation from the enemy should be playing because uh when you are pressing the direction key and it's going to the enemy it already has a Target so it knows that it will hit the target either or or it's a matter of fact of when right so yeah we can actually like do that using uh anim notifies in itself so I think that would be the best choice uh if it's not we'll look into other things as well and before that and uh that's why like I think it's better to actually have uh fluid animations right now also one of the uh uh subscribers even commented on my YouTube channel that um it would be better to see some fluid animation instead of just having movement like this okay so let's go ahead and start that okay so also um I was trying with the Lucy animations and uh the Lucy animations does not actually have good root motion animations so again I'm going back to the close combat anim set for few animations over here for the attacking okay so I'll just rename am at T 001 am ATT go 02 and the last one attack 03 okay and also we have been using the move component to so instead of this what I'm going to do I'm going to use uh something called motion working okay and for that you need to enable a plugin so go to edits plugins and search for motion Waring it's in beta don't worry about it click on yes and restart now I'll restart it and once it has been restarted um yeah we can actually add add the motion Waring component to the character itself right and we no longer need this actually we don't even need this one over here anymore okay this one I'll be using animation not State and from the Montage what I'll do is the Montage to play um I'll go to the ffcc over here I will add animation montages um attack montages sorry and obviously this will be of the type Montage any montage and it will be an array so I can get the attack montages I will get random item and I'll play from there okay and yeah I can add the attack montages over here so I just created the um Montage 001 002 and uh 003 three right so I have these three so yeah they will be playing randomly and let's go ahead and add the um combat window so there's the punch it starts from here it starts from here it ends over there okay and another thing uh you can add now is if you go to add notify State you will see you have this motion warping okay now motion warping means during this animation like this many frames it will actually um move the player from one place to the other also you have to make sure that these are root motion animations okay because motion Waring only works with root motion animations okay so we'll have to give a name I'll give it to Target you can keep everything else as it is and over here after the play Montage I can add or update from location and rotation so I'll do that and obviously I'll be using the I deleted that right so we have the get enemy teleport location we also have the offset and this offset will be 100 I think it was 100 and the name will be the target as we have before so now we'll do the same I'll copy this contrl C uh you can just copy it from here I'll do for all of them first let me add the combat window come here and then I'll contrl V the it'll move till here okay and also make sure you have the target name over here okay and the finally the last one add the I'm bed window have it over here they can overlap that is fine probably here now this animation might be slow so we'll have to check that as you can see works pretty well with the animation the animations are a bit slow though I mean you might want to actually have faster transitions from one place to the other so we can actually like hard code it over here for now to check probably 1.5 yeah much it's much better also need to fix that issue where it collides uh where it actually goes behind one of the character right so that issue is with the collisions so basically the trace channel that we using so I'll create a one then this will be for the free flow okay and by default it will be block okay for all of the channels and what I'll do is uh if you go to the VP Grunts and for the capsule um uh sorry it's already blocked by default for all of them so that's fine so in the find enemy check Collision before teleport we want to change it to free flow okay so now as you can see it actually collides with the Enemy that we have right now as well so we also need to make sure that it does not actually Collide With the Enemy itself and uh right um that is over here let current enemy make sure we ignore him as well yeah now as you can see it does not actually like go yeah another thing that we might do is um let's go ahead and make it much Mo the anding notify States we will create a notify a ANS change potion response yeah so and begin and then we'll be using the end as well so in the begin we have the mesh component we can get owner we can get component by class this would be the capsule component that we have that is a parent and from here what we'll do is we'll set Collision response to channel and this one will be Pawn should be set to ignore okay and when it ends we will set that back block okay can now now let's go ahead and add this notify and this notify window will be only while the movement is going on like this during the motion Waring add the notifi track same again during the movement now let's R we will actually like add something like where the player can Dash uh not Dash sorry jump over so the player will basically if he has to go from here to there and if there it's colliding with the character over here it should actually go for also another thing actually it's better not to do it for the current enemy as well what I'll do is um we are actually over there only how much are we doing 50 do it 20 I think 20 would be enough yeah 20 is enough yeah so uh OB Bly like play around where where the combat window should stop because yeah they whatever you have is basically from where you can actually move like from here itself you should be able to move after you have punched yeah yeah this is much smoother yeah like this one can still be up close yeah and now the final thing uh that is I'll actually um remove that kind of annoying right so the last thing would be to add the notify where the damage will take place so can go to any mify um and over here we have the receive notify now this is just anim notify not anim notify State because um it's it will only trigger once okay and notify and this one will be the hit enemy okay and obviously that's why there should be a new fer there should be a new notify so I'll move it over there and over here um we have the function this one I'll cut it out and paste it over here and from here we can get the owner get component by class this is scorry AC ffcc also um need these valid checks but this one because you never know when one of them might actually give you an error okay so once that is done say true return value and you are done right uh self is the owner my bad and and there you have it now go back now now this is where the anim notify hit should be playing over here I'll copy this again contr C and P it this is where it should play and finally for this one should play over here I'll make a track should play over here okay so now since that is done as you can see yeah they're perfectly timed right now the combat feels really smooth now another thing uh I will add over here it's not necessary but if you guys want to add a bit more um what do you call it flexibility to the system um you can create uh another notify anding notify it NS and I'll call this slow down Montage okay uh I'll have to try this as well okay I'm trying this for the first time so I don't know if it'll work or not so bear with me on this one so from the mesh component we can get any instance get Montage setou LC um okay so this would be the new play rate that will start make it instable and on end it will go back to whatever it was right so by default we are keeping at 1.5 by default so you can keep it however you want right so I'll just try this one out um where is it slow down Montage so obviously like you probably want it to slow down while movement so new play rate let's say I want it to p.2 I'll copy this put it on all of them yeah something like that I'll modify that as well like in the future video because we need this slow down Montage uh when doing the final Montage of the group right has what one does yeah obviously you don't need it that long I mean it's a small before that that kind of a thing so this is also something you can add I'll actually use this later on but yeah we'll also be using this on the enemies itself yeah this is much better so I will actually end it over here and I will remove this um slow down I just wanted to test it out because like I said I haven't done this before so just wanted to make make sure it works as well I'll remove this okay so that's all uh for this lecture okay and in the next lecture um I think we can actually start with the base AI I guess not so sure but probably that might be the topic okay uh also guys uh if you like um this video and the series uh please uh consider um subscribing to my patreon because that helps me to uh keep on making these videos and also uh make this system uh complete by adding animations and uh other effect VFX as well so uh if you can uh please do uh so uh yeah that's all and also thank you for watching this lecture and I will see you guys in the next one
Info
Channel: Unreal Noob
Views: 4,332
Rating: undefined out of 5
Keywords: ue5 batman combat, unreal engine 5 batman combat tutorial, unreal engine 5, free flow combat system, batman combat system, middle earth combat system
Id: V6jlEsXbo1Q
Channel Id: undefined
Length: 24min 31sec (1471 seconds)
Published: Tue Apr 02 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.