Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

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? alt text

Product Version: UE 4.9
ai bp.png (297.7 kB)
ship bp.png (249.4 kB)
scene bp.png (908.4 kB)
more ▼

asked Jan 08 '16 at 01:26 AM in Blueprint Scripting

avatar image

65 11 14 15

avatar image mdagreda Jan 08 '16 at 01:59 AM

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.

avatar image FilipeTessaro Jan 08 '16 at 02:42 AM

Hi, is the ship actor settled to "movable"?

avatar image mdagreda Jan 08 '16 at 03:24 AM

yes, it is set to movable

avatar image mdagreda Jan 08 '16 at 03:33 AM

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?

avatar image mdagreda Jan 08 '16 at 03:48 AM

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.

avatar image Erasio Jan 08 '16 at 03:54 AM

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.

avatar image mdagreda Jan 08 '16 at 04:02 AM

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.

avatar image Erasio Jan 08 '16 at 04:05 AM

Does it print the "Hello"?

avatar image mdagreda Jan 08 '16 at 04:06 AM

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...

avatar image FiftyStars Jan 08 '16 at 03:51 AM

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.

avatar image mdagreda Jan 08 '16 at 04:05 AM

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?

avatar image FiftyStars Jan 08 '16 at 04:17 AM

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".

avatar image Twonkage Jan 14 '19 at 02:28 AM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question