Why can't PlayerControllers stop movement in progress?

Player Controllers can use the SimpleMoveToLocation function, a task that would normally be reserved for an AI controller, but cannot perform a “SimpleStopMoving” type function, where an AI controller would be able to use the “Stop Movement” node. Is this intentional?

If I am missing something, I apologize, but I do not see a good clean way(not even a dirty way, for that matter) of casting a PlayerController to an AIController so that I can abort movement in the same way an AI controller can. Stop Movement Immediately (used on a Movement Component) Zeroes out the velocity and acceleration of a player with the movement component, but it does not abort the path finding to the original target, and it will continue immediately after it has “stopped movement”.

If this is a bug, any workaround for the meantime would be greatly appreciated.

Bump, any response that can point me in the right direction is extremely helpful :slight_smile:

Any changes affecting this in 4.1? Anyone know?

Nope, it stops movement and then continues. I’m on 4.1 and just tried it out.

Can you show your blueprint?

Pictures contained here: UE4 - Album on Imgur

First picture is the code that runs when the user clicks on the ground. This code is standard from the top down template.

Second picture is the code i have added to make the player stop moving when I press the “G” key.

Third picture is the code the executes in MyCharacter to stop the movement. This code simply makes the character stutter, and continue moving along the normal path.

I understand that the Stop Movement Immediately is doing what it is supposed to do, but I do not understand how to tell the player controller to abort it’s movement(from what i can tell, using the NavigationSystem) via blueprint.

Sorry to drag up a relatively old topic but I felt it would be more appropriate than making a new one asking basically the same question.

You mention using the ‘AI Move To node’ so I assume this is referencing blueprint - how would this be achieved through code? I’ve been attempting this same issue and have not yet found a viable solution.

You can just re-execute “simple move to,” giving it the current position of the entity, and it will stop moving where it is. I do this in a top-down project and it works fine!

How is your logic laid out while doing that, if you don’t mind me asking? As I have these functions being called through PlayerTick() and when the ‘SimpleMoveTo’ command is called to move the player to the opponent no further checks for distance are called until this movement is finished (I am assuming because it is a latent function, though I could be wrong?), meaning that though I regularly check for the distance between the two and tell it to stop as soon as the distance is within the player’s attack range, the player continues running until it hits the target.

I just do it based on clicks (this is based on the top-down game example.)
If I click far away, and the character is moving, and I then click right where the character is, it stops moving.
(Note: the original top-down game doesn’t let a click through if it’s too close to the character)
Maybe the move-to controller has some minimum filter, where it won’t listen to a new destination that’s “too close” to the current location?

Okay, I just tried adding an explicit “cancel movement” action by calling Simple Move To from a right-click, and while doing this from left-click works, doing it from right-click does not work. That’s super strange! Color me as confused as you – clicking very close to the character stops it, but right-clicking, which takes the object location and calls simple move to, does not work. (Even if slightly perturbing the location.)

Hey everyone,

The Player Controller now has access to the Stop Movement node which you should be able to call in order to stop all movement of your pawn/character.

Hope this helps!

-Steve