How to move character to point and so it stands directly in it?

I am playing with default TopDown template, it’s using SimpleMoveToLocation for moving character to the point.
What I noticed is when I click, character moves to point, but clearly stops before reaching it entirely.
I tried tweaking some parameters like Fixed Path Braking Distance, which still doesn’t solve problem for short paths.
I also tried changing different braking/acceleration parameters, but then character slides or overshoots target point.
Is there a way to move and end directly at click position?

Braking Distance just determines how long the character needs to stop- it doesn’t change where they’ll end up.

What you’ll want to do is use MoveToLocationOrActor instead. It may look intimidating, but you can ignore everything that isn’t controller, goal location, acceptance radius, and the output exec pin.

I can’t remember if acceptance radius takes into account the radius of the character, so you may want to set acceptance radius even lower than it is- to negative capsule radius.

1 Like

@rokenrock
Well, I now found MoveToActor and MoveToLocation which are similar to node you sent, but they both require AIController as target, when I’m using PlayerController, because I need Input and other stuff.
How to deal with that?

Does this work?

@rokenrock
Ok, I solved my previous issue with creating DummyPawn which sticks to Ai controlled character.

However, your solution doesn’t work. When acceptance radius is -1 or some low value like 5 for example, it makes no difference.
If it’s 100-300 then Ai is stopping even further from destination point, obviously.
image

My bad- I was misremembering.

You can fix this by turning stop on overlap to false/no. It’s not shown by default, you’ll have to expand the node:
image

2 Likes

I regularly put negative values in random UE4 fields so see how it works, sometimes it does. Was curious, never tried that.

That’s how I accidentally learnt that every entry field is a calculator:

1 Like

@rokenrock
Huge thanks, that works

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.