Download

Unable to Stop Character Movement with Axis Input

I am Using the Top Down Blueprint For Unreal Editor 4.26.1. I am having an issue with trying to get the mouse commands to stop moving my character after I input WASD axis commands. When i click a location, even after I am using WASD, it will still move me to the clicked location after all other inputs are completed. I am usign the Spring Arm1 for my refernce because the WASD needs to move my character in relation to the camera position. I have another code snippet that allows me to rotate the axis with my Middle Mouse.


I checked it out and you just need a different stop movement function and a little extra setup in the character

First grab a reference to your top down player controller.

Then on the input axis moveforward and moveright check if the axisvalue is nonzero.
If it is get the controller reference and call function stop movement (It should say the target is the controller).

I don’t know if it’s an issue but here’s a setup that avoids calling stop movement every frame.


If you want to block the mouse move to input while a player is controlling the character this seems to work.


On the moveright inputaxis set can move to right instead of can move to forward

I have implemented this and it seems to have worked. Thank you for the quick response! This was my first post.