"Simple move to Location" - issue

So I’m dabbling around with unreal engine using the “Topdown example preset”, for a click to walk game.
My character preset is using the “Simple move to location” node, but it always stops 0.5 meter away from the clicked location, this seams to be the default behavior and is a problem. Someone sugested I should lower my Acceptance radius. Does Simple move have that somehow? or can I use Move to Location on a player controlled character as well? :slight_smile:

What about MoveToLocationOrActor? It has an option to ignore collision.

I will try. Does that work in the Player controller?? Like simple move to?

Same sort of thing I think…

I wonder if the player controller might not be compatible with “move to location”…
I’m starting to think maybe I’m not ment to do it this way ^^,

I haven’t done a lot of ai moving but the little I have done, I can’t really get a good result. Pawn either stops before the goal or it starts pathing weirdly the last bit, as well as slowing down. Not really desirable results by default.

Some people said It should get more accurate if I turned down the “Acceptance radius”, but I cant seem to get any of the nodes that have that setting working with the “topdown example” project.
(I’m probably forgetting some setting or something)
I wonder why “simple move to” stops before reaching the target. How does it even calculate if it’s reached there or not? is it the collision box of the player?

By default the topdown starter has a player controller which is not an AI controller.
I’m not sure of the AI MoveTo Task would work with a pc but I am guessing not.
And yes, it seems to be when the character capsule overlaps the location, but… how would it work for a pawn? Haven’t tried.

The issue does in fact lie within the acceptance radius, it is not the collision, simple move to in not that much difference to move to location, so I would recommend switching it. Just set the acceptance radius to 0, nothing more, nothing less

Hi, I finally got it working by adding a custom AI controller, but I have a smal question remaining:
Now I dragged my player into the game, and press play, the character will walk correctly to the clicked location. (which is what I had problems with)

My issue is:
if I use the “Player start” my character does not move, and
if I use the character placed in the level, the character moves fine, but the camera does not follow him.

This is probably some obvious setting, but I’m quite new to the “game” side of unreal. So any insights would be greatly appreciated :slight_smile:

In your character blueprint details tab, find Pawn section and adjust Auto Possess AI to your needs.

yes, I’ve played around with this setting, It seams to me that the moment the player is possessed, then it starts using the old player controller instead of the new AIController that I made.

I’ve been reading some responses from other ppl online:

One guy said:

(5- 10 cm is accurate enough for my needs so I don’t need to do that bit)

Soo… I guess I’m wondering does this approach sound viable? and Should I make a Player controlled camera and then attach it to my character somehow?

So It seams that having an “empty character” with just a camera, follow my AICharacter could be a viable solution.
I tried stripping down a standard character and just add a camera in there. This follows my AIController character quite nicely, but when they both get to the destination they start colliding into each other. …there has to be a simpler solution than this. :confused:

You can still use a camera of character possessed by AI. There is SetViewTargetWithBlend function available in player controller blueprint. Just pin AI’s character into NewViewTarget and you will use this camera.

Very interesting. This is kind of promising.
When i set it in the Character controller, the camera view moves the center mass of the target.
The same noes in the level blueprint correctly transitions the camera to the Top down view.
(So this is what I want)
However as It transitions, the inputs from the character controller gradually stops to take effect.
Where is the best place to add camera control back in? (zoom in and rotate and so on)

The AI controlled character does not seem to accept inputs…

Mind to show how you are doing it right now? It should be easier to point you in the right direction.

Great News! :smiley:

I finally managed to get it working with the help of your suggestion. (The “SetViewTargetWithBlend”)
So basically I just needed to make a new empty pawn and slave it to the AI-controlled character, then
instead of the input keybindings (that was on the character) I made custom events.
(because the key-inputs where no longer working when the character was not “the player”)
These I triggered with a reference to my character (and camera) from the pawn with a copy of my key-inputs.

Thank you for pointing me in the right direction! :slight_smile:

Hah! Glad you managed to get it working!