Home Forums General Discussion Navigate to dynamic gameobject on navmesh

This topic contains 1 reply, has 2 voices, and was last updated by  prime 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #6616


    I’ve been able to go through all the Rain tutorials, but I am still not able to do something basic that I can easily do with Unity’s builtin navmesh… I don’t think I’m “thinking Rain” yet, as my previous effort has now amounted to over 6 hours of fail in trying to understand Rain.

    How do I get an AI to navigate to a dynamic position specified by MonoBehaviour or as manifested in GameObjects’ transform positions (that could be dynamically instantiated by other MonoBehaviours)?

    Could you provide an example?



    Your moveTarget can be a game object, and that game object can move around - no problem.


    ai.WorkingMemory.SetItem<GameObject>("moveTarget", gameObject);

    This also works if you detect the target game object with a sensor.

    Then use a Move node in your BT with the Move Target set to moveTarget.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.