Taming System In Unreal Engine !

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so hello everyone in this tutorial we are going to create a Advanced Pet system so right now you can see there is a deer which is randomly moving in our scene or in our map whatever you want to see and what will happen if I will come closer to her and press F now she's my pet okay now she will follow me wherever I go she will follow me and if I will press e then you can see that she's sitting there and she will wait for me until I will come again and make her stand then she will follow me again so now I'm pressing e again after coming near to her and now she's following me again so this is going to very easy tutorial to be follow so make sure to subscribe let's get begin so before starting there you can see I am using this animal pack which I downloaded from epic games and here we are going to get all the animals and its animation so in my case I'm using this reindeer you can use any other animal if you want but for my case I'm using this reindeer so you can use it so so what we are going to do first first I will create a folder where I'm going to keep my all Blueprints and all things of my this reindeer so you can just right click on your content browser here create a folder and name it whatever you want I'm just going with a new mob and now open this file and now what we are going to do here just right click and create a blueprint for an actor and this actor is going to be our deer I mean reain dear itself so just name it BP dear n click to open this and here inside our skeleton mesh we will just simply add our this reindeer in it and we will adjust it inside this capsule and now inside our viewport when we will come inside what we are going to do here just simply dag drag your this character I mean this reindeer blueprint inside your viewp put uh let me show you why we are doing it then there you can see the foots of this reindeer is not actually aligned with our map so make sure to adjust that perfectly so that it will look kind of good otherwise we will feel that she is just hovering above our map so now it's good and that's good now we have to focus on our random moment of this animal or reindeer whatever you want to say so firstly delete this all we don't need any of them and here what we are going to do here we are going to create a custom event for our this tier so just search for a custom event and name this custom event as a follow randomly or random moment whatever you want and here now search for a node the name of this node is AI move to basically this will give um velocity to our character and under the pawn make it so that we will tell the note that the corrector is our reindeer itself and under this destination search for get random reachable points in location so that it will move randomly in a map and under this origin search for get World location for our mesh compile and save this and now come inside your game I mean map and here what we are going to do first before pressing Play We Will search for NV Miss BNS volume this will actually allow our character to move in this map otherwise without this our character will don't show any movement so make it bigger the way you want and if you will press P after reading this then you can see all the possible area where it can move now P again to just make it unvisible and now if I will press play then you can find that it's not moving still so this is because when I will go inside my blueprint oh wait let me add the radius first you can add this radius as per your need I'm just making 7,000 right now and this is because it's not moving because here you can see we just created a random event we have to tell our blueprint then when this random event is going to be implemented or executed so search for event begin play it means whenever our game will start and here search for our this recently created random M node and just execute it so as soon as our game will play it will execute this and connect this on success with it so that it will be permanent and going to be infinite so now if I will press play then there you can see our this reindeer is moving the map randomly here and there so that's looking good but now we have to work on its animations because she's mve she's feel like she's just floating above the map so we have to work on its animations go inside your content browser right click under animations select Legacy and select blend space 1D and select your skeletal mesh which you are using basically it's our reindeer and name it whatever you want and here just simply search for for your idle animation firstly and put it here okay and uh now under this your right hand side turn on use grid and in this horizontal axis set the maximum axis as 450 or you can do it as per your need actually this is the this is going to tell us the speed of Animation going to be changed okay so I mean final animation speed so here just turn off this we don't need it okay now here SE for a run animation and also add it to your screen this blend space is used to create a transition between different animations so if you press control and drag your mouse over this graph then you can see our transition that we just created so yeah it's kind of good the player our reindeer is coming from idle position to running position and here just copy this maximum exis we are going to make our blueprint speed I mean in our character speed which is under character movement and just change the our character speed from 600 to 450 so that it will little slower otherwise it will very fast so now it's all done we don't need our this blend space anymore I mean we don't have to work on it this anymore now we have to implement this into our scene I mean into our character so just create a animation blueprint and here again select your reinder from here rename it whatever you want and double click to open it and here what we are going to do search for our blend space that we just created and drag it into your scene and connect this with our output posst and compile then you will find that here our reinder is doing this animation now click on this and promote this to a variable and now we have to work on its graph so click under this event graph and go here and here just search for get velocity so basically we are getting a velocity of this length she is going to cover and here search for a vector length Okay and here inside this graph I mean this variable this is the variable of our blend space here just drag it and set it and connect this with it and this with it now we are good to go compile and save it and we don't need our this animation blueprint anymore I mean we don't have to work on it anymore and now if you'll go inside our blueprint and here just go inside your viewport select your mesh and scroll up side and under this animation pose or yeah anime class I mean just search for your ABP I mean animation blueprint deer which have you created and just compile and save it now our de is finally ready when you will give a go in your game and there you can see that our animations are working well now finally it's time for our taming system so let's move ahead for that and under our blueprint oh wait let me first arrange this because this is kind of messy now here go inside your content browser and right click and create a blueprint interactions and what this interaction actually do this interaction is a collection of multiple functions so it is going to make our project more easy so name it whatever you want and double click to open it inside this you will find a default function so just rename it by taming and simply compile and save it save it now we have to implement this interaction into our blueprint which will be our obviously our deer or reindeer whatever you say so come inside a blueprint under class setting here there is a option Implement interaction so here just search for our recently created taming interaction and add it then you will find on this interfaces there is a new option is popping up which is taming so we can just create a event using the streaming so now we have to add some notes in our character in my case I'm using third person character you can go on with your own character and here get a f key or any key that suits for you I'm using the F key right now the soon will press F key for each Loop then we'll get a for each Loop here and under array we will get a overlapping actor which is basically our reinder itself so we will drag a node here and ask for get overlapping actor and here we will select our reindeer blueprint now from this array element ask for a node does implement and here select our recently created implementation blueprint which we created so select it press B and left click on your screen to create a branch node and connect connect it with our for each Loop and under this conditions connect it with our return value so what is going to happen here as soon actually it will ask is our character is overlapped on our this deer if yes then the staming function will happen and we are going to create this staming function after this now I'm adding this blueprint into a command so that it will look more arranged now come back to your rers blueprint and here under interface right click on The Taming and implement this event now what we are going to do we are making this event to follow our character so get a AI move to and under Pawn make it and this time we are not going to use the destination this time under the target actor we will just get our third person corrector and under this acceptance radius make it 150 this is the r radius how much distance the companion is going to be stop after reaching us and on success just repeat this particular function which is our taming itself now under here just add a sphere of collision so that our character can sense it and just add a sphere of collision and scale it the way you want now after coming in a game now our deer is following random moment now sunna will come to her and press F now she is following us so it's working great now we have to work on our sit and back to normal so let's go for it now go inside your interaction blueprint and here add another function and name it sit and stand so we are going to use this function for our sitting and standing things so just compile and save it now go inside your third person character again and here I'm using e key for sitting and standing input you can use any key as per your need and now we will just simply copy this upper side notes and paste it here and connect it with our e key now here you can see inside of this blueprint this SE and send we are going to implement this over there so just get this node by searching sit and send and connect it with true it's same as our above one but we have to do some additional function in its blueprint so now just compile and save this and back to your deer blueprint and here just Implement our s and stand event and there what we are going to do actually we want this to implement only when our deer is stamed so I will create a Boolean is stamed or not so and I will attach it there in our taming node and make it true so that if this taming function is happening it means our deer is steamed now we will get a a branch inside of this event to check if it's stamed or not and if it stamed then we will do a flip-flop so just get is stamed and connect it with conditions and if it's true then it will just go with a flipflop first time it will going to sit and second it's going to back to normal so just set here our character movement and make just make it whether active or not I'm definitely not making it active so that it will stop mov moving and here search for plan animation for our mesh and here we are going to add a setting animation of our character I mean reindeer now compile and save it now we are going to test it so we will go inside our blueprint map and when I will hit the play now first we have to tame it so now right now I'm pressing e nothing is happening and after going close to her I'm still pressing e nothing happened I pressed F now she steamed now if I press e there you can see she sit and she she is not showing any movement and yeah she's sitting now we have to work for our B option so here just copy our this corrector movement node and paste it here yeah and before just getting this caror movement actually I wanted to play an animation otherwise she will move and also play the animation so just here copy this play animation and paste it here now we will simply drag now we will simply drag our animation in this and I will connect our B with our play animation then our this corrector movement and lastly what I want after getting this our movement I want her to just follow over this function which is of taming which is basically just following our character again now if we will go inside our game again there you can see first I have to tame her so I will press F now she's tamed and now if I press press e then she will and if I will press F she will stand and she will have to follow me why she's not falling wait I think I did something wrong here so let me check in my blueprint okay actually I have to take it on so that it will active now if we'll see then she should must follow us so first we have to tame it oh now she's tamed she's sitting and if I will press F okay she's following us but there you will find that we lost our animations so what we have to do here after taming we will want her to get back to our normal animation so we will search for animation mode and attach it there now we will go back to our game and here I have to tame her first so I will press F now she's tamed and now I will press e wait it's kind of glitchy okay I will press e again okay now she's sitting but she's not doing that animation so what this is because we are not getting time for playing this animation so we will add a delay here and I will make this as 1 second that's enough for this I think and now if we'll go for a test then there you can see I have to tame her first so okay now she's tamed if I will press e she's sitting and if I press e she's standing and she's following me again so that's enough for this video If you have any query related to this you can ask me in the comment session and you can also join our Discord server I will give the link of Discord server in my description that's enough for this video bye-bye
Info
Channel: DevEdge • Abhay
Views: 393
Rating: undefined out of 5
Keywords: DevEdge, How to make Animal Taming System In Unreal Engine, How to make taming animal in unreal engine !, How to make taming system in unreal Engine, Taming System In Unreal Engine, Taming system in game unreal Engine, unreal engine
Id: nFsa5qZNOgs
Channel Id: undefined
Length: 16min 43sec (1003 seconds)
Published: Wed Jan 03 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.