How to move the character?

Hello,

sorry for my mistakes, in am not english.

I am doing a multiplayer game, and I would like to make roll animation if the player press “R”.
So it is quite simple, I have downloaded my animation, create a input action for rolling and play the montage if R is pressed. So, all of that is working well.

My problem is that the player is doing the animation whithout moving (and it is normal because my anim is “in place”). I can’t download an roll animation not in place and use it because I can’t use root motion in multiplayer.

Consequently, I would like that, when I press “R”, move the character for 100 unit or something like that following the forward vector.

What I have tried :

-Use the node “set actor location” and change the location of the capsule (in the world) with the switch option enabled : the player is moving too quickly and since I change the capsule location in the world, the camera don’t sweep to the location.

-Use the node Add movement input (as we use when we want to move forward with W, A, S and D keys). I connected it to my input action but it does nothing…

-Use the node AddImpulse, then AddForce… but all this node do nothing (I thought that I don’t know how to use it correctly, or maybe they are not usefull in my case)

I am sure there is a simple way to do it but I was’nt able to find it.
Would someone help me ?

Thank you very much !

Best Regards

I would just like to check whether you connected the add movement input node’s scale value to the axis value? That is a commonly missed thing when setting up character movement

Thank you for your answer. At first time I thought that you had’nt understood my problem but you are true !
In fact, I wasn’t using the Axis Mapping. I was using action mapping.
So I have done 2 mapping :

Action Mapping = If press R I display Anim
Axis Mapping = if press R I move forward.

The only problem with this is that I have to keep pressing R to move during roll. I would like to press R only once and then it move me forward. Have you an idea to do it ?

Thank you again for your answer !

If I understand correctly, you are trying to press R to start moving forward and press R again to stop moving? In that case, you can set a bool (e.g. bShouldMove) to true when R is pressed, and set it to false when pressed again. On event tick, if bShouldMove is true, AddMovementInput with scale value = 1.
If you still have questions feel free to ask anything you don’t understand

Edit: Instead of posting questions as answers, you can post them as comments to the questions

Thank you for your answer !

(I am sorry but I can’t add comment… In the past I was able to do it but for 2 months now my Epic Game account is totally weird, I can’t add comments, mark answers, mark subject as resolve or even edit my answers and it is REALLY boring for me. I tried to change my browser, even my computer but it doesn’t help. I tried to contact the support but they never answered me…)

In fact, I would like to implement the R key and no matter how long I press the touch, I would like to move for 100 units my character and play an animation. If I press 2 times the R touch, then I play 2 times the animation and move my character of 200 unites.

If I press R touch for 5 seconds I should be exactly the same as pressing R touch for 1 second.
Only the number of times I press the touch matters. In fact, I was looking for a node that do something like move actor to world location, or something like that but I think it doesn’t exist.

Thank you again for helping me!