Add movement input not working

Hello!I want to make a touch slider and to add movemnt input in the oposite direction of the slider touch end

.

What’s not working? The “Add Movement Input” node is not executed?

the charater is not moving and i think that the add movement input is not working

The final print string is working fine showing the good next location but the add movement input is doing nothing.

  1. Is the final Print String working?
  2. Put a Print String before the branch, and check the result of “Vector2dLength”. Is it working as expected, I mean, do the values make sense?

Yes my charater BP has a movement component

Does you pawn have a movement component?

Yes it is moving

Does your pawn move if you just set the direction manually? As in hook it up to Tick and move it in X with value 1?

So what kind of numbers does that Print String spit out then?

You use release location to calculate something during tick but the data is stale since you only get it once you release. By that time the gate is closed. So the data cannot be used.

It might be intended depending on what you’re doing, you might be relaying on the data from previous touch. Hard to tell without knowing more. You sure have an idea in you mind.

Any reason why you’re not using gestures for this?

It is showing the next location X and Y but the charater is not going there

I feel like I need to grill you for info and it’s a one sided conversation. So I’m gonna tap out on this one and apply myself elsewhere, sorry.

One last tip: World Direction is quite different from Location. So maybe look into that.

Good luck!

Thanks! i made it but do you know how can i change the speed of the character?

One question: the movement should be after release or during pressing?

After the release

Then Everynone is right:

You use release location to calculate something during tick but the data is stale since you only get it once you release. By that time the gate is closed. So the data cannot be used.

Rethink your design.
Since upon release you have both the initial and the final positions, you can use, for example lerp, to do the movement. Or even better, MoveTo. Or …

I made it . Now it works great but is there any way to change the speed of tha character?

Select character movement and set the walk speed (if the character is in Walking mode):

306323-1.jpg

But can i change it from blueprint? For exemple if the slide lengh is longer the character will be faster.

306324-1.jpg