Directional Roll/Dodging | Unreal Engine 4 tutorial (Inspired by Dark Souls)

  Рет қаралды 52,772

Unreal RPG Mastery

Unreal RPG Mastery

Күн бұрын

Hey guys, thanks for watching! This is an UPDATED version of my previous directional roll tutorial. So, this version has some improvements. A rolling animation with root motion is required! But no need to worry if you don't have one, I provide one for free!
I hope my tutorial on directional rolling was able to help you! If you have any issues let me know in the comments below and I'll try my best to help out.
Link to free rolling animation with root motion:
drive.google.com/open?id=1M7g...
Join our Discord server!:
/ discord

Пікірлер: 119
@UnrealRPGMastery
@UnrealRPGMastery 4 жыл бұрын
This tutorial is NOT complete! There are still two bugs that we need to fix. However, this will require some knowledge on how to handle montage priorities and montage canceling. So, I opted to do that as a part two. In part two I cover how to handle both animation montage priorities and montage canceling. You can find part two here: kzfaq.info/get/bejne/pKpoa8SQssrepKc.html
@xantishayde-walker4593
@xantishayde-walker4593 4 жыл бұрын
Ok, I would move onto part 2, yet that's useless if I can't even get past the first "Test" of part 1 where you get the basic dodge roll mechanic to work. I would appreciate some kind of help with this, a month later. Thanks.
@UnrealRPGMastery
@UnrealRPGMastery 4 жыл бұрын
Xanti Shayde-Walker You’re still having trouble? Sorry I didn’t reply to your other post. I thought you were probably just missing something simple. Usually when a montage isn’t playing it’s either a retargeting issue or a slot issue. But before I could tell what’s causing the issue I’d need to take a look at the code. Play the game in a window and go to the code where you try to play the montage and turn on debugger. What happens when you press the dodge button? Does the execution path make it to the play anim montage function? If it does & the montage still isn’t playing check if the right slot is selected. Also make sure that the skeleton for the animation is in the exact same folder as the skeleton for the character you want to play the montage. The skeletal mesh for each must be in the same exact folder location. What I mean by that is, they must use the same exact mesh file. Not two duplicates with the same hierarchy. The exact same skeletal mesh file.
@xantishayde-walker4593
@xantishayde-walker4593 4 жыл бұрын
@@UnrealRPGMastery I said this in another comment, but I did debug and it does actually get to Play the Anim Montage. The only thing I can think of is it's a duplicate Skeletal Mesh named exactly the same and I didn't notice, yet I think it's the same path aka the same Skelly. I'll have to check that. Thanks for the reply, no worries. I was just a bit salty. If the Skelly checks out, I'll figure out how to send you my project so you can check it, I guess.
@arezgod14
@arezgod14 3 жыл бұрын
I cannot download the file for free rotation animation with root movement, please give a new link or update the previous one.
@frankmarkus8098
@frankmarkus8098 2 жыл бұрын
you prolly dont give a damn but does any of you know of a way to log back into an Instagram account? I was dumb lost my login password. I love any help you can offer me
@guillermofleitaspulido
@guillermofleitaspulido Жыл бұрын
This was what i was looking for, thanks man, the play montage node was dryving me crazy
@KINGDOMSONSTV
@KINGDOMSONSTV 3 жыл бұрын
Very good tutorial, added that bit more smoothness to the movement.
@Arxontas10
@Arxontas10 4 жыл бұрын
Hey! Thanks mate, pretty cool stuff! isnta subbed ;D
@TACKO3D
@TACKO3D 4 жыл бұрын
Very Helpful! Giving me ideas for specific projects of mine.
@BarbaNeggra
@BarbaNeggra 3 жыл бұрын
Thanks a lot sir, very well explained and helpful!
@ruiyangxu5101
@ruiyangxu5101 3 жыл бұрын
Thank you for the amazing content. A few words to summarize on the last coding part: Instead of instantly setting the orientation of the character in one frame, it will smoothly set the character to the desired orientation over several frames (controlled by time & speed variable.)
@emivargas1751
@emivargas1751 4 жыл бұрын
I did NOT got any of the second part on how to make the roll smoother, but It worked and it showed me that I still have a lot to learn
@gabba64884
@gabba64884 4 жыл бұрын
Thank you so much! So useful tutorial!
@anidiot1538
@anidiot1538 4 жыл бұрын
Proud to be your 420th subscriber
@scottlee38
@scottlee38 4 жыл бұрын
Very nice!
@XnathOW
@XnathOW 3 жыл бұрын
Quick tip to clean code and use the OP node Select. At 10:53 you can add a Select-node with Index being HasMovementInput, and set true/false to return the rotation into a single Return Node.
@d9kod9kod9ko
@d9kod9kod9ko 4 жыл бұрын
Thank you!
@frojoapps7311
@frojoapps7311 4 жыл бұрын
Another insta sub, best tutorial I have seen so far on YT! Would love some more explanations for why you do what you do (e.g. had to google anim montage vs state machine), but I guess this is targeted toward more intermediate/advanced users (I'm just two weeks in, having watched some Udemy and most recommended YT channels) and there seem to be a million different ways to accomplish things so I guess it doesn't make sense to go too much into depth in every design decision. Just curious, what's your education/background?
@sin4jasu
@sin4jasu 3 жыл бұрын
Hey, for the cutscene showcasing the rolling animations, what animation did you use for the 1-handed sword?
@Scalvenger
@Scalvenger 4 жыл бұрын
So, a few questions: First, the backwards roll animation starts the character at the end and rolls them back to the start. How would you fix that? Second, if you use two inputs (ex: forward+right) you end up teleporting and sliding all over the place. Is there a way to stop that? Overall, awesome video. I’m new to UE4 and this has been a great tutorial video (even if it took me all day to follow to the end).
@giulianobianco4025
@giulianobianco4025 4 жыл бұрын
is not working when my character is targeting a enemy, he can´t rolling to the left and rigth.
@jakelevitt8222
@jakelevitt8222 3 жыл бұрын
Thanks for the tutorial! Im not sure why but after using the roll a couple of times my montage for attacking is disabled until i am hit.
@thesnailking8658
@thesnailking8658 10 ай бұрын
What if I wanted to use a method other than root motion so I have more control over the distance of the roll?
@xantishayde-walker4593
@xantishayde-walker4593 4 жыл бұрын
Ok, so I'm having the problem that my character won't Play the Anim Montage, even though I followed this exactly. I have tried debugging and it is actually getting to the Play Anim Montage Node, it's just not working. I have tried changing the Key used to another key (Z), I've tried to change whether Shift is needed to Jump or Roll and nothing seems to work. I'm using the Default Slot for the Animation, I'm using the Default UE4 Mannequin, Skeleton, everything and I just don't what to try next. Any help would be much appreciated. Thanks!
@reflexentertainment4698
@reflexentertainment4698 4 жыл бұрын
Don't know if you solved the problem or perhaps this is not the solution for you but I solved it by simply adding a layered blend per bone in the Animation Blueprint. It would be annoying and inconvenient to explain it so I will just link a screenshot instead: drive.google.com/file/d/1NHjbmPVKyqkNs_hnDIvCbR86PBBfNV30/view?usp=sharing Cheers
@xantishayde-walker4593
@xantishayde-walker4593 4 жыл бұрын
@@reflexentertainment4698 I solved it. I had multiple copies of the UE4 Skeleton in the project and had to retarget the animations to the right skeleton.
@IgorGoncalez
@IgorGoncalez 4 жыл бұрын
great tutorial, i think it was the best roll system i saw on youtube, i would like to ask, i have a target system similar to darksouls, do you think when the is on target character will have big changes in that roll system?
@UnrealRPGMastery
@UnrealRPGMastery 4 жыл бұрын
Thank you! Yes you will have some issues using this with a targeting system. It’s because this rolling system uses set actor rotation and so does most targeting systems. Since most targeting systems sets the players rotation to the AI, then without any additional code, your character will just roll into the enemy while locked onto the target. You won’t need to change the rolling system but you will need to do some additional code to the get desired rotation function in the player character that we created with a BP interface. I figured a solution for this issue a long time ago. But, if you need help solving it then hop into our discord server and post in the #help channel. I’ll help you fix it. The discord server link is: discord.gg/DQWbDHJ.
@IgorGoncalez
@IgorGoncalez 4 жыл бұрын
@@UnrealRPGMastery So I adapted the code, creating a boolean variable to store when the animation montage is playing, so in animBP when the animation is playing I'm setting some values, orient rotation to movement to true, use controller desired rotation to false and use controller rotation yaw to false, this is functional, but a little glitch comes when transitioning from the end of the roll to the beginning of the walk, I spent all day trying to understand why this happens, do you have any ideas? Video showing the glitch : kzfaq.info/get/bejne/aK2el9RiycCmZY0.html
@UnrealRPGMastery
@UnrealRPGMastery 4 жыл бұрын
@@IgorGoncalez Your issue is likely because you're setting those values when the animation is playing. You're switching movement mode Booleans on and off when playing the rolling animation and those movement modes use different data to control the movement & rotation of the character. So setting them suddenly like that at the beginning and ending of an animation that uses these values to control the rotation will cause these little bugs. Your issue is your solution, that's not the best way to handle allowing the directional roll while targeting.
@noctis7093
@noctis7093 3 жыл бұрын
so the movement works but it causes a screen shake..anyone have any ideas why that might be?
@DarkKiller-so3jp
@DarkKiller-so3jp Жыл бұрын
I have a question! If there was an enemy in front of me and I were to dodge forward, how would I get the player to dodge to the side of the enemy? Right now, my player character will dodge forward, but not move because there is an enemy in front of him. In dark souls, I would roll to the side of the enemy so how would I do this?
@IllyasArt
@IllyasArt 4 жыл бұрын
You make probably the best UE4 tutorials, almost every other tutorial just shows you how to make their exact system which is completely useless. You actually teach people! Are you making a game?
@UnrealRPGMastery
@UnrealRPGMastery 4 жыл бұрын
Thank you for the kind words! I appreciate it ^_^. Yes, we are making a game. Right now we’re trying to recreate Dark Souls combat, next we’re going to start working on Sekiro combat, then finally Nier combat. Then after all that we’re going to design our own combat system for our actual project. Are you making a game or just learning how to make them?
@IllyasArt
@IllyasArt 4 жыл бұрын
@@UnrealRPGMastery That sounds cool af! Currently I'm making a game like Code Vein :D. I look forward to your game project :3
@UnrealRPGMastery
@UnrealRPGMastery 4 жыл бұрын
Lopiky Oh cool! I have Code Vein I just haven’t had time to play it much yet. But it looks like a great game. Well if you have a discord account join our server and share your progress. We’d like to see it.
@IllyasArt
@IllyasArt 4 жыл бұрын
@@UnrealRPGMastery I feel that, the only reason I was able to play it was because I was too sick to work haha. I joined the server and will definitely be sharing progress once the game looks presentable :3
@UnrealRPGMastery
@UnrealRPGMastery 4 жыл бұрын
Lopiky I’ll get around to playing it eventually. Great! Glad you joined, Code Vein style definitely isn’t easy. Good luck! We’re interested to see your progress.
@Stormexists
@Stormexists 3 жыл бұрын
The google drive link doesn't work
@balamp0512
@balamp0512 4 жыл бұрын
Can I do it on a first person game ?
@thesnailking8658
@thesnailking8658 10 ай бұрын
Character teleports to the start even with root motion enabled. Anybody know what else I could be doing wrong?
@davejones2227
@davejones2227 2 жыл бұрын
Thanks for a great video, this is awesome! I do wonder how you would go about making a roll system if you already have directional roll animations though?
@preston748159263
@preston748159263 2 жыл бұрын
If only we knew
@davejones2227
@davejones2227 2 жыл бұрын
@@preston748159263 Actually, i think it's more or less the same process. You just use root motion animations to drive it instead!
@preston748159263
@preston748159263 2 жыл бұрын
@@davejones2227 I ended up using root motion but i read thats no good for multiplayer :(
@davejones2227
@davejones2227 2 жыл бұрын
@@preston748159263 There are other alternatives you can use. You could try keeping the same animations, tick root lock to convert them into in-place animations (or just in the in place alternatives) and launch the character using code instead. But as far as I know root motion is fine for multiplayer if you're using montages. If you're using sequences it doesn't work so well.
@preston748159263
@preston748159263 2 жыл бұрын
@@davejones2227 Oh okay I am running them as a montage function so maybe that will work. Thnaks for the advice! I need to start learning multiplayer soon because I know nothing yet.
@boonztv3454
@boonztv3454 3 жыл бұрын
which a button to rollback pls help me
@dzirt0677
@dzirt0677 Жыл бұрын
And how can I add invulnerability to the character when he dodges?
@BlackWolvesRebellion
@BlackWolvesRebellion 4 жыл бұрын
how would i make the roll go further does it depend on the animation?
@UnrealRPGMastery
@UnrealRPGMastery 4 жыл бұрын
It depends on the animation if you use root motion, but root motion isn't required for this to work. You can set his velocity to control the amount he goes forward. To do this you get the actors forward vector, multiply that by a float (the float value will control how far he goes), then set his velocity as the vector you just calculated by multiplying his forward vector by that float value. Just make sure the animation isn't using root motion. Setting velocity won't work while the animation is extracting root motion. Also, you're going to want to disable his movement during this roll since you're setting his movement with the code.
@taketheredpill1452
@taketheredpill1452 3 жыл бұрын
@@UnrealRPGMastery SUPER Awesome reply. Huge thanks :) -- [nice question too]
@mrmagit5239
@mrmagit5239 3 жыл бұрын
the link to the animations is not working?
@Neppu-dan
@Neppu-dan 2 жыл бұрын
Looks interesting, can I use the roll you linked with root motion disabled though?
@Phyllion-
@Phyllion- 2 жыл бұрын
A bit old but in case you never found the answer or anyone else wonders; you should normally be able to disable root motion in all animation, in its asset there should be a check box called something like "enable root motion" (somewhere on the left panel where you'll also find animation blend and other settings if I remember correctly)
@Aethelvlad
@Aethelvlad 3 жыл бұрын
For everyone wanting the animation, I took the liberty of extracting it from ARPG and retargeting to the current UE4 skeleton drive.google.com/file/d/1bhMPyQ4-nKdoQFtodL3iFC3WWPbWVOH_/view?usp=sharing
@perfect1353
@perfect1353 2 жыл бұрын
Hey bro u still have that animations I really need that
@thenoticerofthe13
@thenoticerofthe13 4 жыл бұрын
the animation is not free. the link to the google drive is not going anywhere. i cant find an animation i can use. any suggestions ?
@giulianobianco4025
@giulianobianco4025 4 жыл бұрын
You can go to mixamo.com and put "roll" in animation space, then download the animation.
@thenoticerofthe13
@thenoticerofthe13 4 жыл бұрын
@@giulianobianco4025 thank you i'll try it.
@qux7148
@qux7148 4 жыл бұрын
when i try to test the dodge; after dodging the character will warp back to the the start point of the dodge so no forward movement progress is made while dodging. Can anyone offer some advice?
@samhein321
@samhein321 4 жыл бұрын
did you enable root motion?
@TolisPiperas82
@TolisPiperas82 4 жыл бұрын
@@samhein321 same as qux.how to enable root motion?
@joelholland1414
@joelholland1414 3 жыл бұрын
@@TolisPiperas82 Inside the dodge animation, look for the enable root motion check box
4 жыл бұрын
Download is broken help
@ozlevin1678
@ozlevin1678 4 жыл бұрын
Thank you very much for the tutorial! I have a question tho, I did everything that has to be done but still when I press the button animation doesnt get triggered? I dont know what I did wrong plus when I check the root animation box, my character starts to bug. Like a really serious bug, Please I need help :(
@ozlevin1678
@ozlevin1678 4 жыл бұрын
and my second question is: What contains that State Machine which you plugged to Default Slot component? (you didnt show it in video)
@ozlevin1678
@ozlevin1678 4 жыл бұрын
I tried another one which is this: forums.unrealengine.com/filedata/fetch?id=1126117&d=1511352186 and in this one I cant figure it out because when I search for the 'Calculate Direction', it doesnt show up in Blue format, its always in Green format. Thats why I couldnt figure that out as well, if you have any idea about this as well Id be much appreciated .
@ozlevin1678
@ozlevin1678 4 жыл бұрын
btw currently my character can walk, rotate smoothly, even run. And camera is ideal as well, I just wanted him to roll like in Dark souls thats all I need. Thank you!
@UnrealRPGMastery
@UnrealRPGMastery 4 жыл бұрын
There could be any number of reasons your animation isn’t playing. It’s hard to tell without looking at the code. However, some of the things you should check. Check if the default slot is added to your animBP, then check if the slot you added is selected on the animation montage. If those things are fine then play the game in editor window mode. Then go to the player character BP and select the player character as the debug object. Press the roll button and see what’s happening with the flow of execution. Does it stop anywhere? With the root motion bug that could be for a couple reasons as well. Could be retargeting issues, could be an issue with the root bone depending on where you got your animation. Also, if the animation isn’t targeted to the skeletal mesh of the player character the roll animation won’t work. So that could be a potential cause for the roll animation not playing. As for the state machine, it’s the default UE4 state machine you get with the third person template. I didn’t make any changes to it so there was no need to show it. I used montages, when you use a montage the montage animation from the slot you added to the state machine will play onto the output pose meaning there is no need for state machines when montages are used.
@ozlevin1678
@ozlevin1678 4 жыл бұрын
@@UnrealRPGMastery I got the animation and the character from Mixamo, probably thats why Im struggling with the Root thingy. Im going to try a little bit more and thank you for your answers!! :)
@DiskordiaUKGR
@DiskordiaUKGR 3 жыл бұрын
My montage won't play after queing it like that
@ziroadoki_
@ziroadoki_ 4 жыл бұрын
did not work :(
@tvjoda
@tvjoda 3 жыл бұрын
Hello, where can i get the files? the link is broken, thanks
@XnathOW
@XnathOW 3 жыл бұрын
Mixamo
@sin4jasu
@sin4jasu Жыл бұрын
In my opinion, not having the entire rotate owner bpi part makes the rolling more similar to dark souls, as in the game it is also "jittery" and "gamey" rather than smooth.
@iosifjipa5248
@iosifjipa5248 3 жыл бұрын
i can't download the file of the roll animation, can u help me?
@smithsanchez3585
@smithsanchez3585 3 жыл бұрын
X2, but disable adblock
@iosifjipa5248
@iosifjipa5248 3 жыл бұрын
@@smithsanchez3585 what does X2 mean?
@sebastianrudholm3293
@sebastianrudholm3293 4 жыл бұрын
This tutorial is great, but you need to slow down a bit, even if this is not a tutorial for noobies, you know what to do next, we know a second after complete it, and it doesn't helps that you editing writing to save seconds, we still need to write the whole thing and makes us ending up behind even more
@UnrealRPGMastery
@UnrealRPGMastery 4 жыл бұрын
Sebastian Rudholm This rolling system is honestly really simple. If it’s too fast just watch it once, find out what I do, learn from it, and write down the basic steps. Then afterwards make it in the engine, really the main thing that makes it work are two important nodes. Last movement input vector & rotation from Xvector. The rest is just smooth rotation. But, I will keep your feedback in mind for future tutorials.
@sebastianrudholm3293
@sebastianrudholm3293 4 жыл бұрын
@@UnrealRPGMastery Had no problem to finish it, needed to pause a few time but that's life, it's more like a friendly tip, people is not willing to see a video 3 times because they can't keep up, or stressing and doing things wrong. Like I said, someting worth thinking of. =)
@blupman12
@blupman12 2 жыл бұрын
i dont know man those "bugs" seem like gameplay features to me
@yzoneworld
@yzoneworld 3 жыл бұрын
That was quite long, but we made it.
@Luke-hg3eb
@Luke-hg3eb 2 жыл бұрын
Link to this doesn't work.
@turomatulic
@turomatulic 2 жыл бұрын
Broken link
@nobIeseis
@nobIeseis 3 жыл бұрын
mm we can't download it mate :/
@peter486
@peter486 2 жыл бұрын
actually you double tap for roll. pretty common.
@jacobbarrow532
@jacobbarrow532 4 жыл бұрын
to fix the problom at 4:30 easily, go to the beginning of the action input in your bluerpint, make a node called "DoOnce" and connect it to the rest of the blueprint. Then, go to the end of the blueprint and drag the last node and make a delay node. and put about 4-6 seconds in the delay box. then drag the end of the delay to the reset function on the DoOnce node.
@rafaelmelo1910
@rafaelmelo1910 4 жыл бұрын
thats work
@UnrealRPGMastery
@UnrealRPGMastery 3 жыл бұрын
That's poor coding practice, sure that will work & be quick and easy short term. But, you'd need to adjust the delay value for every animation, because some may be longer or shorter than others. Say you fire this code for dodge, well a great sword may have a longer dodge animation & end early because your delay is too short. Mine works every time you call the function without the need to do anything else.
@Aethelvlad
@Aethelvlad 3 жыл бұрын
@@UnrealRPGMastery Agreed.
@Kkewal_
@Kkewal_ Жыл бұрын
Rolling animation link is DEAD 👎
@igotbit9454
@igotbit9454 2 жыл бұрын
Sound too low. :(
@hotfever
@hotfever 4 жыл бұрын
blueprints seem so complicated. guess ill start learning it someday..
@UnrealRPGMastery
@UnrealRPGMastery 4 жыл бұрын
They're really intuitive once you get the hang of them!
@Lucasbsf94
@Lucasbsf94 4 жыл бұрын
thanks man @Unreal RPG Mastery, but i have a problem that when my character is in target on the enemy when i use the dodge it doesn’t go in the direction that i point out as it is in this video here: kzfaq.info/get/bejne/pp2febybsdS1fX0.html can you help me apply that way?
@UnrealRPGMastery
@UnrealRPGMastery 4 жыл бұрын
The reason the character doesn't rotate while targeting is because with most targeting systems you set the characters rotation to the enemy. But, the directional roll system also relies on set actor rotation. So, you end up only setting the rotation to the enemy for the roll. You're going to have to modify your targeting system & set the characters rotation to the enemy in the interface function. It takes a bit more work but it is possible to get this system to work with targeting systems.
@screwdajuice
@screwdajuice 11 ай бұрын
Jesus Christ, man. How bad were the video quality standards back in 2020?
@TolisPiperas82
@TolisPiperas82 4 жыл бұрын
when i try to test the dodge after dodging the character will warp back to the the start point of the dodge so no forward movement progress is made while dodging. Can anyone offer some advice?
@RaulViniciusJFS
@RaulViniciusJFS 4 жыл бұрын
Did you enable Root Motion?
@sushicolada6463
@sushicolada6463 4 жыл бұрын
@@RaulViniciusJFS Thank you ! I get the same problem but now its solved :)
@RaulViniciusJFS
@RaulViniciusJFS 4 жыл бұрын
@@sushicolada6463 Glad to help =)
I Turned Fake Mobile Game Ad into a Real Game
10:26
Fat Dino
Рет қаралды 3,5 МЛН
Stop, Intel’s Already Dead!
13:47
Linus Tech Tips
Рет қаралды 153 М.
Каха заблудился в горах
00:57
К-Media
Рет қаралды 10 МЛН
WORLD'S SHORTEST WOMAN
00:58
Stokes Twins
Рет қаралды 130 МЛН
Пранк пошел не по плану…🥲
00:59
Саша Квашеная
Рет қаралды 7 МЛН
3 Devs Make An FPS - Godot vs Unity vs Unreal || GameDev Battles
12:39
Why Unreal Engine 5.4 Is A Life Changer | Asmongold Reacts
20:23
Asmongold TV
Рет қаралды 968 М.
HOW I Created the Cinematic with UNREAL ENGINE 5
12:32
Sako CG
Рет қаралды 220 М.
25 Tips and Tricks you (probably) don't know about Unreal Engine 5
16:06
Unreal University
Рет қаралды 59 М.
The biggest lie in video games
15:18
AIA
Рет қаралды 1,7 МЛН
Why I’m switching from Unity to Unreal Engine
9:02
LixianTV
Рет қаралды 1 МЛН
Omnidirectional Dash
14:20
Ryan Laley
Рет қаралды 10 М.