Hi. I’m a new Unreal Engine 4 user. I’m trying to make a character for a dungeon-crawler game, and am struggling to make a functional dodge/roll mechanic. The character can roll in 3 directions (left, right, and forward) and can hop backwards as a fourth dodge.
my current dodge funtion changes the player’s max walk speed while dodging. However, the player is able to stop moving at any time during the dash and travel in other directions during the dodge animation, which looks unrealistic. How could I code an event that sends the character in the direction they’re walking in, and during that time, the player cannot influence the movement of the character? There are no dodge tutorials that address this specific issue, so i’ve been trying to figure this out myself for an hour already.
you have some input plugged in your character movements,
you want these input to be working only if you are not dodging,
so add a condition “if dodging is false”
so when you want to dodge you have to set the direction dodging, the speed , and the time the dodge will take, and set for this time the var Dodging to true,
so the inputs will have no effects for that time,
and when the time is passed , you set back dodging to false,
the speed to normal .
Years ago I bought this dodge roll kit by Hammerhead.
And have a decent sized thread about it here.
I think the first thing you need to consider is how or what means you will use for propulsion of your roll. I didn’t use root motion in the animations but launch character.
I think what you are looking for are disable input and enable input for starting and stopping player movement while rolling. The key seems to be on the placement of those two nodes in the code of your roll.