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. 

MoveTo (BTTask) Firing, but not moving

I have a behaviour tree for a simple AI that wanders around. The b-tree is attached to an AIController with a PawnSensing Component. When the pawn sees the player, it raises a flag that it has seen the player. From there, the B-Tree takes over. Now, when I set a random wander point in a sequence followed by a MoveTo, it works flawlessly. However, when I seek the player position, and call Move To, it fires each one off right after another (everytime) and does not move the bot. Here are some frames of the tree working (wandering), then not working (seeking player). As well as the Seek Player task (to note: I set the Z because in another question I read, it may be out of bounds, which this was (Z:149 - why, I don't know, I didn't make the player scripts).

The Player Seek Sequence: alt text alt text

The task itself (I made sure all casts work and I actually hit Finish Execute) alt text

Product Version: Not Selected
more ▼

asked Oct 25 '14 at 05:01 PM in Blueprint Scripting

avatar image

133 4 7 11

avatar image Janyx Oct 25 '14 at 08:18 PM

After the "SeekPlayer" function executes it should return a vector. Watch that vector after SeekPlayer executes, what values does it return?

avatar image smartyMARTY Oct 26 '14 at 03:08 PM

You can see in the screen captures that the keys are valid. When the character moves it does change from the 0,0,30 to the players position.

avatar image Janyx Oct 26 '14 at 03:15 PM

Just to make sure, You added a navigation mesh to your level right? and when you press "P", does it appear as green? Also make sure the navigation mesh is tall enough. Make sure you don't forget to rebuild pathing, this will prevent the character from being able to move

avatar image smartyMARTY Oct 26 '14 at 09:07 PM

Yes, there is a navigation. And yes, it shows as green when I turn on the navigation mesh view. Also, when I use move to for the wandering, it works seamlessly.

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

2 answers: sort voted first

In practice you should just use PlayerPawn's location, without any Z-alteration. You might want to extent default navigation query extent - you can do that via NavigationSystem.SupportedAgents in your project's setting.



more ▼

answered Oct 27 '14 at 06:26 PM

avatar image

MieszkoZ STAFF
7.3k 223 57 412

avatar image smartyMARTY Oct 27 '14 at 08:56 PM

I only resorted to the z-alteration due to this issue, as it was happening before without any alteration. The reason behind this was to maintain bounds in the nav mesh bounding volume. I will look into the navigation query extent to see if that does actually fix the issue.

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

The z value you've done probably won't work as it is a world value and it needs to be your location, I've had problems like this with my characters being taller than the AI enemy characters and somehow effects the navmesh. What I did that worked for me is, my z location -120 (the height difference between characters enemy AI 1.8m my character 3m) Let me know if this works for you, I've asked this question before and nobody else had this problem Cheers

more ▼

answered Oct 25 '14 at 08:00 PM

avatar image

Alan Webster
860 50 34 81

avatar image smartyMARTY Oct 26 '14 at 09:09 PM

So rather then getting the player location (in world space), break vector, set world z to 30 (same as find random point in radius for the perfectly working random wandering) I should subtract 120 from the z and make vector again?

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