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 Character stops/pauses after "Move To"-node

I am making an AI-Character and using the "Move To"-Tasknode inside the behaviour tree. When the character reaches the location of the move to node, he stops shortly and the moves on to the next point. "Stop on overlap" and the tollerance threshold don't seem to have any effect. I wrote a custom task with the "AI Move To" node and the same result.

Only when I do the "AI Move to" inside the "Receive Tick"-Event of the Task it seems to work. But that can't be it due to lack of efficiency.

The character is not supposed to stop (zero out velocity) after the "Move To", right? This is a bug, isn't it?

Product Version: UE 4.14
Tags:
more ▼

asked Feb 02 '17 at 08:49 PM in Bug Reports

avatar image

Pseudocorpus
426 38 47 143

avatar image Sean L ♦♦ STAFF Feb 03 '17 at 04:42 PM

Hey Braindrain85,

What's your setup look like overall? Are you moving between different target points?

Could you provide a couple of screenshots of your setup?

avatar image Pseudocorpus Feb 03 '17 at 06:59 PM

Hey Sean,

thank you for your answer. Of course I'll provide you with some screenshots.

In the AI-Character Blueprint, the AI senses the player, makes sure he isn't dead and saves a bool and the Player-Pawn as an object: alt text

This is what my Behaviour Tree looks like: alt text

The AI is basically patrolling around (right side) until it sees a player which it is then trying to chase (left side).

aipawnsensing.jpg (311.3 kB)
blackboard.jpg (209.2 kB)
avatar image Pseudocorpus Feb 03 '17 at 07:00 PM

These are the tasks of the "chasing" part:

alt text

alt text

alt text

alt text

I hope this helps.

avatar image Sean L ♦♦ STAFF Feb 07 '17 at 07:18 PM +

Sorry for the delay.

I've created a simplified version of this setup where I have an AI Character patrolling various points using the Move To node to move between them. I am not experiencing any pausing on my end.

Would you be able to create a simplified version of your setup that just uses the Move To node in order to see if you're able to reproduce the issue? It would be great if you could get it to occur in a clean project and provide me with a set of repro steps that I can follow to see it on my end.

The only thing I could think of that would cause this is that the task is pausing before being called again, which I would imagine would occur if you are calling Finish Execute as it will stop the task, which will then need to be called again in order to start moving. But it's possible I'm overlooking something in your setup that would prevent this.

Let me know what you think and if you are able to reproduce this with a clean setup.

Thanks!

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

0 answers: sort voted first

solved it !

If you are using MoveTo Node, it will add velocity to your character component. Now when you reach waypoint, the velocity becomes 0 for 1 frame before it find the next waypoint and starts moving towards it. At this time, my speed value in the animation blueprint fell down to 0 and my character loaded the idle animation (if you are not using animation, you are still probably having something with the character movement component?)

Solution : Create a custom task-> In this task, write logic to Traverse through all the waypoints in the blueprint using AI MovetoLocationOrActor inside the blueprint (you have all the options of MoveTo). Keep traversing until you reach the last way point. Once you reached the last waypoint -> Finish execute.

Make sure it doesn't finish execute until you reach the last waypoint (Do some recursion, much easier), by this way the velocity never becomes 0 as it will never "finish executing" the move to.

more ▼

answered Feb 05 '18 at 04:58 PM

avatar image

shrikky
218 6 9 12

avatar image Pseudocorpus Feb 05 '18 at 05:38 PM

Thanks for sharing your approach!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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