Hi there, I’m starting out trying to get multiple AIs to navigate the surface of a sphere. Its pretty basic right now, I have a spherical Navmesh and a few Navmesh cuts for obstacles.
I started out using AIPathAlignedToSurface with mixed results. The AI would move, however only one would move at a time, and I keep getting the following exception:
NullReferenceException: Object reference not set to an instance of an object
Pathfinding.AIPathAlignedToSurface.UpdateMovementPlane () (at Library/PackageCache/com.arongranberg.astar@4.3.47/Behaviors/AIPathAlignedToSurface.cs:85)
Pathfinding.AIPathAlignedToSurface.OnUpdate (System.Single dt) (at Library/PackageCache/com.arongranberg.astar@4.3.47/Behaviors/AIPathAlignedToSurface.cs:18)
Pathfinding.AIBase.OnUpdate (Pathfinding.AIBase[] components, System.Int32 count, Pathfinding.Util.BatchedEvents+Event ev) (at Library/PackageCache/com.arongranberg.astar@4.3.47/Core/AI/AIBase.cs:471)
Pathfinding.Util.BatchedEvents+<>c__DisplayClass14_0`1[T].<Add>b__0 (System.Object[] objs, System.Int32 count, Pathfinding.Util.BatchedEvents+Event ev) (at Library/PackageCache/com.arongranberg.astar@4.3.47/Utilities/BatchedEvents.cs:150)
I also noticed that while the agent moves in Unity, when I build and run on my android device the AIs don’t move (maybe this is due to the exception?).
Next I tried using RichAI instead of AIPathAlignedToSurface but I can’t seem to get the destination to set. I have the Destination Setter component added, but I don’t see any target listed in the RichAI debug info in the inspector.
Any help on these or where to get started would be greatly appreciated.