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.

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

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.

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.

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

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 :slight_smile:

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