Search Unity

navmesh destination arrived works on cube or sphere, but not on imported mesh

Discussion in 'Navigation' started by digiman72, Oct 24, 2018.

  1. digiman72

    digiman72

    Joined:
    Oct 6, 2018
    Posts:
    31
    Hi there I hope someone can help, I been successfully getting a player to collect resource, and then return to like a storage hut , then go back....the navmesh system works great if I use a box or sphere as a example resource , ex: "Apples" , "tree1", the destination arrived works, but when I set up an imported mesh with any kind of collider, my character still goes to the tree mesh, but the destination arrived does not fire for some reason.

    I tried 3 different tree fbx meshes, with no animation, but it never works, I tried playing with the stopping distance, it will stop at correct distance but yet it still doesn't get destination arrived to fire, then I click on sphere or cube and it works...I could show you some code, but like I said, it works on the sphere and on the cube, but not on the imported tree mesh, I even tried creating empty object and placing my tree mesh inside it, and putting collider on empty gameobject and script but it still wont fire the arrived at destination...its really frustrating. Maybe someone has encountered this before, there are no subgroups on mesh btw too..

    thanks for any help you can give me
     
  2. digiman72

    digiman72

    Joined:
    Oct 6, 2018
    Posts:
    31
    Update!!, I tried adding another cube as another ex: food resource, or tree resource, and darn, it doesn't work now either, but yet the other sphere and cube do work, but not the extra cube I added, now i am really lost, lol ????
    I checked all the steps I did with the other sphere and cube, they all have colliders setup the same, and it will still go towards the destination, but does not fire when arrived, this is confusing ??
     
  3. digiman72

    digiman72

    Joined:
    Oct 6, 2018
    Posts:
    31
    as you can see below, the character just keeps walking, but the other picture shows when he gets there he starts an animation, is it a instance problem of the script, I did double check my script on my tree cube, made sure incase to make it a new script object as well, but still doesn't work
    Capture2.JPG Capture3.JPG


    Capture4.JPG

    Capture5.JPG
     
  4. digiman72

    digiman72

    Joined:
    Oct 6, 2018
    Posts:
    31
    ughhhh, im sorry for the waist of time, it was the script in my character too, oh boy :(
     
  5. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    Glad you found it..