How do I get AI Move To to work?

I have set up a blueprint that is calling the AI Move To function and I have a navmesh and I’ve attached the ai to the pawn i want to move but when the blueprint runs the AI Move To function nothing happens except the print statement i put after the ai move to. What am i doing wrong?

Hi, is the ship actor settled to “movable”?

Do i have to use a skeletal mesh or something weird like that? i keep seeing people using that built in 3d avatar guy whenever they show how to use ai move to.I just want my static mesh to be able to move around. I hope there is a way for that.

yes, it is set to movable

ok so this is strange but it looks like when i try printing the name of the object returned by get player character the string it gives me is none. So what could be causing this? I mean i have a ship i am controlling in the game so shouldn’t that be what it is getting?

So even changing this so that i am just using get all actors of a class and then getting the actor i want and plugging that into the target actor slot for the ai move to function did not work. So i guess that was not the only thing broken in this very simple thing i need to get done.

I guess your pawn just doesnt know how to move. Characters are using character movement component for that purposes. Try to add floating pawn movement component. Or create custom one.

Have you tried setting a destination instead of character and look if it works?

If it does how do you spawn the character? Is it a default spawn (using the game mode defined character or one you’ve set up to be possessed by the player)?

Because it is possible to control a pawn without setting it as your player character. It’s not something one should do (because of things like this) but it’s possible.

yes I’ve tried setting the destination and that did not work. I am just using the character set up in the twin stick shooter example so I’m not sure if that is a default spawn or if it has been set up to be possessed by the player.
Is there a better way to get this character to move around using the nav mesh? what ever works is fine at this point I just need something.

thank you! floating pawn movement got it to move. now i just have to make it rotate and it will look pretty alright. Why did I have to use the floating pawn movement?

Does it print the “Hello”?

yes it would print hello, but i managed to get it moving by adding the floating pawn component. Not sure why I had to do that but it worked at least. 6 hours of work and I now have basic ai movement! yay…

How should your pawn know how to move? It can be a teleporting, flying or swimming thing. You can imagine tons of rules and dependencies for movement. So movement component is responsible for these “rules of movement”.

Is the spawn point elevated at all if so have you tried a delay before calling AI MoveTo? I’ve been experimenting and it seems that if it’s not touching the floor before calling the function it doesn’t function properly I may be wrong but it may be worth trying.