ac1.52a
u5.3.5p8
Sometimes when I click on a hotspot I get this error and afterwards I can't move the player anymore.
It depends where I stand in the room.
IndexOutOfRangeException: Array index is out of range.
AC.NavigationEngine_PolygonCollider.GetPointsArray (Vector3 _originPos, Vector3 _targetPos, AC.Char _char) (at Assets/AdventureCreator/Scripts/Navigation/NavigationEngine_PolygonCollider.cs:117)
AC.ActionCharPathFind.Run () (at Assets/AdventureCreator/Scripts/Actions/ActionCharPathFind.cs:98)
AC.ActionList+<RunAction>c__Iterator2.MoveNext () (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:324)
UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress)
UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
AC.ActionList:ProcessAction(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:288)
AC.ActionList:ProcessActionEnd(ActionEnd, Int32, Boolean) (at Assets/AdventureCreator/Scripts/ActionLis
Comments
The problematic line in NavigationEngine_PolygonCollider reads:
Vector3 vertex = new Vector3 (pointsList[i].x, pointsList[i].y, _originPos.z);
Try inserting above it:
if (pointsList.Length >= i) continue;
What happens then?