Support Forum

Default AIPath, AIDesinationSetter, Seeker Setup Questions


As the title states, using the default AIPath, AIDestinationSetter, and Seeker components, how do I :

  1. Dictate movement for an agent? Do I have some kind of Waypoint (Transform GO) that I keep re-positioning and have the AIDestinationSetter target that?

  2. Stop movement? So far, I have something along the lines of :
    1 = = null;
    2 = AIPath.SetPath(null);
    3 = AIPath.canSearch = false;
    4 = AIPath.canMove = false;

  3. Re-implement movement? Re-enable the above every time I need to move something?

Sorry if this is just too uninformed. I have looked at the accompanying tutorial videos and documentation but have possibly missed how to implement these simple behaviors. If anyone can help answer these questions or direct me to a tutorial/video/documentation, it’d be greatly appreciated. Thank you.

  1. For anything more complex I would recommend removing the AIDestinationSetter and instead just setting the ai.destination property. It avoids the overhead of having a transform just for the target point.
  2. Depends on how you want to stop movement. If you want the agent to slow down gracefully, and still interact with other agents with local avoidance (if enabled) and gravity. Then use ai.isStopped = true. Setting it to false later will make it continue along its path. SetPath(null) does essentially the same thing, but if you can canSearch = true as well, then it will quickly recalculate its path and start moving again. canMove = false will disable all movement logic completely. Usually this is not what you want to do.
  3. See (2).
1 Like

Thanks a lot for help!