Forum rules - please read before posting.

Problem with Walk-to Marker.

edited April 2017 in Technical Q&A
Hi!
Please help me.
I have Hotspot with "Walk To Marker" on "Use" button. When I use it, my character only turn  to object and stoped. 
For project I use "Direct" movement method and input "mouse and keyboard".

In console writtеn:


IndexOutOfRangeException: Array index is out of range.
AC.PlayerInteraction+<UseObject>c__Iterator0.MoveNext () (at Assets/AdventureCreator/Scripts/Controls/PlayerInteraction.cs:947)
UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
AC.PlayerInteraction:ClickButton(InteractionType, Int32, Int32, Hotspot) (at Assets/AdventureCreator/Scripts/Controls/PlayerInteraction.cs:840)
AC.PlayerInteraction:ClickInteractionIcon(Menu, Int32) (at Assets/AdventureCreator/Scripts/Controls/PlayerInteraction.cs:1935)
AC.MenuInteraction:ProcessClick(Menu, Int32, MouseState) (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuInteraction.cs:452)
AC.PlayerMenus:CheckClick(Menu, MenuElement, Int32, MouseState) (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:2065)
AC.PlayerMenus:CheckClicks(Menu) (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:1727)
AC.PlayerMenus:CheckForInput() (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:1813)
AC.StateHandler:Update() (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:309)

Comments

  • edited April 2017
    Welcome to the Adventure Creator forums @Argus. Anyway, to better provide you with support, we'll need you to provide us with some more information. First, what AC and Unity versions are you using? Also, it would be of great help if you could post some screenshots of the content's of the actionlist you are running on you Button's Use actionlist slot. A screenshot of your Menu and Button's settings (from the Menu Manager) would also be very useful.

    Edit: Ive been looking though the code, and it seems that this has a high chance to be related to the navigation mesh (which is most likely not there). Have you made sure you have a proper navigation mesh in your scene? 

    Is your game 3D or 2D? Remember that in your Scene Manager you can setup your scene to use either of the following Pathfinding methods: 1. Mesh Collider, 2.Unity Navigation, 3.Polygon Collider(2D), or 4.Custom. 

    If you don't have a custom made Mesh collider, I recommend you to use Unity Navigation instead. Once you have selected Unity navigation as your Pathfinding method, under the Scene Manager, you have to bake the navmesh. To do that, go to the Unity editor's Window menu, then click on Navigation and then select the Bake tab. If you want more information about baking a navmesh you should check Unity's navmesh baking tutorial you can also see an example of how to use Unity navigation in the AC video tutorials.
  • @Alverik
    Thank you so much for the support and quick help!
    It was I haven`t bake the navmesh. After baking navmesh, all work without problem!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.