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 Actor with pathfinding

Hello everybody!

I am developing a game with AI and I am creating the enemies. The first of them is easy: get close to the player and when you are near, attack. To do that i use the node Move To Actor, from AIController. The movement starts well but in the middle of the way it stops.

alt text alt text here is the code and the tree, I simply use the node with the player reference as goal. And the result is this.

alt text

The movement started in the upper left corner and instead of reaching the player (the red sword) it stopped in that point.

Someone knows why this happended? Maybe I need to use another node? I looked the AIMoveTo but it doenst support navmesh.

Thanks for your time!

Product Version: UE 4.20
Tags:
code.png (152.8 kB)
falloiamove.png (439.7 kB)
tree.png (69.4 kB)
more ▼

asked Aug 22 '18 at 01:18 PM in Blueprint Scripting

avatar image

Bahamut1892
22 1 2 9

avatar image ThompsonN13 Aug 22 '18 at 01:52 PM

why are you not using the built in move to functionality that comes with behavior trees?

avatar image Bahamut1892 Aug 27 '18 at 10:49 AM

I tried it but it doesnt move. Simply I change the BTT_MoveToTarget to Move To but it doesnt work very well. If I put the enemy actor in different places, sometimes it works and sometimes not and I dont know why. Also, when I see the trace of functionality of the behaviour tree, when the actor doesnt moves, the execution starts flickering :S

avatar image mightyenigma Dec 06 '18 at 09:31 PM

Maybe its acceptance radius is too large?

avatar image Erytriel Dec 06 '18 at 10:28 PM

did u try the movement without obstacles? maybe its colliding with something

is the behavior tree firing correctly? what says the decorator?

maybe another way to do it:

taking the upper movement node in your task and on finish you link a "finish execute- checked" note behind it

alt text

thats a random point walk in radius you can put ur targeted actor there. my behavior tree looks like this :

alt text

aasdasd.png (75.4 kB)
weqeqeq.png (41.6 kB)
(comments are locked)
10|2000 characters needed characters left

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