News Forums RAIN General Discussion and Troubleshooting Mecanim Move node raising exception

This topic contains 3 replies, has 2 voices, and was last updated by  prime 1 year, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #6175


    I’m seeing this exception raised when testing the Mecanim Move node inside a parallel (v 2.0.8).
    It’s trying to follow the player & the exception is sometimes raised if the player is moved.

    IndexOutOfRangeException: Array index is out of range.
    RAIN.Navigation.Pathfinding.BasicPath.GetWaypointPosition (Int32 waypointIndex)
    RAIN.Navigation.BasicNavigator.GetNextPathWaypoint (Boolean allow3DMovement)
    RAIN.Motion.MecanimMotor.Move ()
    RAIN.BehaviorTrees.Actions.MoveAction.Execute (RAIN.Core.AI ai)
    RAIN.BehaviorTrees.BTActionNode.Execute (RAIN.Core.AI ai)
    RAIN.BehaviorTrees.BTNode.Run (RAIN.Core.AI ai)
    RAIN.BehaviorTrees.BTParallelNode.Execute (RAIN.Core.AI ai)

    Here’s an example Behaviour Tree where the exception is sometimes raised.

    Thanks for your help.



    Does this only happen when the player is moved off the navmesh?



    There are 2 overlapping NavMeshes that are part of some geometry instantiated using Prefabs at runtime.
    The exception happened after the NPC successfully moved to the player & stopped. Then, occasionally when the player moved, the exception would be thrown. It seems a new path was being calculated, but somehow the Path array indexing got messed up. I can only guess since I can’t step the code.

    The “IsPlayerOnGraph” node wasn’t having any effect in this test. Even when I replaced it with a timer (to drop out the parallel), the exception would sometimes be raised.

    I’ve replaced the AI.Navigator with a test one (by subclassing the BasicNavigator) so as to try and catch the exception. But I have not seen it since I made that modification.

    I’ll let you know if I collect any more information regarding the exception.




    The bug should be resolved in our 2.0.9 patch.

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

You must be logged in to reply to this topic.