x

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"

AI "Move To" Node Fails

Hello, So everything with my AI is communicating fine, the blueprints hooked up to the Behavior Tree and Blackboard just fine. I created a random location generation with the X and Y coordinates, the map is perfectly flat so I just hardcoded the Z value to the Z value of the AI I placed on the ground. None of the coordinates land in an X and Y value that is inaccessible to the AI. The NAV mesh is showing up in all of the necessary places. However, every time the AI tries to move, it fails. Thanks!

Product Version: UE 4.21
Tags:
more ▼

asked Jan 04 '19 at 11:53 PM in Blueprint Scripting

avatar image

mathman212
1 1 2

avatar image Ronnie Olive Jan 04 '19 at 11:56 PM

It could be caused by a few different things.

  1. Have you tried to "build paths"?

  2. How are you getting / setting the location that you want the AI to move to? Could you show a screenshot?

  3. If you are using Behavior Trees, make sure things are in order. If there is another sequence being called, it could be interfering with your moveTo function.

avatar image mathman212 Jan 05 '19 at 12:54 AM

First I do not know how to build paths unless it's just rendering the NAV mesh. Here are some screenshots. Also, it does appear to actively call the "MoveTo" task, but it quickly jumps off of it and back on leading me to believe it has failed with no movement of the AI. Also, in the screenshot you can see I have a task called "WalkTo", it's basically the same as "MoveTo", and it does the same thing when the "MoveTo" is in its place.alt text

alt text

ingameshot.png (659.5 kB)
behaviortree.png (88.0 kB)
avatar image Ronnie Olive Jan 05 '19 at 01:11 AM

I'll include some screenshots when I get home from work tonight, but one of the first things I noticed is that you're using 3 values on your "set blackboard value as vector".

You should recombine those pins, and use a node called "get random point in radius", it's a lot cleaner, and in my experience generally has less bugs when working with things like this.

Also I can't see the logic behind the "checkstate" so i dont know what's in it. But from reading what's there it looks like it's running every .4 - .6 seconds.

Also, place some "print strings" in areas where you think it might be failing, so you can see exactly where it's failing.

avatar image mathman212 Jan 05 '19 at 02:08 AM

Alright, so I tried doing the "get random point in navigable radius" because that was one of the only two things popping up, (I tried the other as well, which was basically the exact same outcome), I had already set up print strings, and made it so that the value could only be set once. Everything appears to execute fine until the AI tries to move.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hey, so I figured out the issue. Basically what was happening was I was using a pawn which is apparently incompatible with the AI "Move To" node, most likely because it does not have the same movement functions set up, so all I did was move everything from a pawn blueprint to a character blueprint

more ▼

answered Jan 28 '19 at 11:18 AM

avatar image

mathman212
1 1 2

(comments are locked)
10|2000 characters needed characters left
Your answer
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