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"

C++ Extending AIController - How to MoveTo()

How is the AI controller supposed to be set up?

I have a Character, blueprinted that the Controller is set to my AIController class. I overrode Tick and tested with breakpoint that it is being hit, but MoveTo does not seem to do anything. The character has Textured SkeletalMesh with an Idle Animation playing on it instead of the box from the example but is basically the Character used for the player in the C++ example otherwise.

Just for the Test I put in a FVector of 0,0,0 for the target of the MoveTo. I was expecting the character to move to the area and then shudder, or something like that but nothing happened.

I noticed other functions such as MoveComplete. Are we just supposed to set a loop up in Tick that incrementally makes a small move checking for MoveComplete, or is MoveTo latent?

Does something need to get registered first, like a Path that MoveTo is relying on? Hard to tell how it's supposed to be used with only having the headers to look at and no example.

Product Version: Not Selected
Tags:
more ▼

asked Mar 11 '14 at 02:07 AM in C++ Programming

avatar image

ue4-archive ♦♦ STAFF
49.9k 3662 1989 9113

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

2 answers: sort voted first

Can you post your navmesh questions as a new question? Thanks!

more ▼

answered Mar 11 '14 at 02:07 AM

avatar image

ue4-archive ♦♦ STAFF
49.9k 3662 1989 9113

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

Unfortunately, the navmesh system is not yet well documented, nor are there good examples of use in the sample games. We are working on addressing this issue. We are also in the middle of some refactoring of the path following code, so hopefully the system will be more useable in the near future.

Did you build a navmesh in your level? The move will fail if you don't specify a valid location on the navmesh.

more ▼

answered Mar 11 '14 at 02:07 AM

avatar image

ue4-archive ♦♦ STAFF
49.9k 3662 1989 9113

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 02:07 AM

I wasn't sure how to build the nav-mesh.

Right now I found a work around going straight to a location that can work until more path-finding is ready.

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 02:07 AM

Hi Mike,

Here's a fast way to make your navmesh:

  1. Engulf the area with the Editor Brush

  2. Add Volume > Nav Mesh Bounds Volume

  3. Build > Build Paths

  4. Press 'P' (this does not generate the mesh, just allows to view the path mesh)

The map will now have a mesh overlaying all of the walkable surfaces within the volume. This is very basic and may leave you with undesired walkable surfaces. You can play with brush size and details to your liking. I hope that this has helped.

-Alexander

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 02:07 AM

I just tried the method creating a NavMesh Bounds Volume and I must say it was much easier than adding pylons, and the build time was also quite fast :)

so now I'm gonna jump over here and ask a few questions about NavMeshes in general:

  1. will you support usage of 'imported meshes' as navmeshes?

  2. will there be support for moving platforms and such with navmeshes? what about interactable obstacles like doors?

  3. will you add some support for runtime navmesh generation? I don't expect a full re-cast while playing the game, only the possibility of spawning objects that come with their own navmesh pieces (answer to question 1. would need to be yes)

I'm asking this because yesterday I started working on an implementation of [the dynamic pathfinding system I did for UE3], and now would be a great time to stop if the navmesh functionality is expected to fill in the gaps that made me need such a custom system

(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