Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Bug My NavMesh not function good, my IA not up my slope

Discussion in 'Scripting' started by Zazou67, May 22, 2024.

  1. Zazou67

    Zazou67

    Joined:
    Nov 24, 2023
    Posts:
    38
    Hi, i want doing that my IA go up my stairs with my NavMesh, but she don't want, i don't uderstand why she doing that !
    Thanks help me in th little bug (it's maybe me or one setting not good !) :):confused:
     
  2. Zazou67

    Zazou67

    Joined:
    Nov 24, 2023
    Posts:
    38
    upload_2024-5-22_22-47-49.png good
    upload_2024-5-22_22-48-1.png not good (why ???)
    upload_2024-5-22_22-48-24.png my NavMesh
     
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    39,355
    Was the navmesh built properly to go up the stairs? If not, fix that first.

    Sometimes with stairs it is necessary to change angles or to put extra flat invisible colliders over the bumps on the stairs.

    Of course make sure 100% of navigation surface is marked Static Navigation
     
    Zazou67 likes this.
  4. Zazou67

    Zazou67

    Joined:
    Nov 24, 2023
    Posts:
    38
    Ok i go test that now ! (sorry, i was go sleeping becaus i'v school a tomorow) ;)
     
  5. Zazou67

    Zazou67

    Joined:
    Nov 24, 2023
    Posts:
    38
    it's not a stairs... it's a slope (i don't know if equal or not :()
     
  6. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,166
    does your navmesh show its going up the slope or is it not coloured?
     
  7. Zazou67

    Zazou67

    Joined:
    Nov 24, 2023
    Posts:
    38
    he's colored, it's good, but my ia knock my slope :eek::(
     
  8. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,166
    so if you set the destination at the top of the slope what exactly happens?
     
  9. Zazou67

    Zazou67

    Joined:
    Nov 24, 2023
    Posts:
    38
    What destination ? i don't understand sorry :confused:
     
  10. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,166
    well the point of a navmesh is your agents move to a destination.......
     
  11. Zazou67

    Zazou67

    Joined:
    Nov 24, 2023
    Posts:
    38
    Ok, the destination is my player, i see of my IA can not up, she's not enough speed, or i don't know that problem, if you want more detail, teld me please :(
     
  12. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,166
    Well, you havent uttered anything about what happens so

    upload_2024-5-23_18-45-49.png

    little man goes up
    upload_2024-5-23_18-47-5.png

    and theres my agent having walked up the slope
    upload_2024-5-23_18-46-23.png

    so, you need to show what you're doing different.
     
  13. Zazou67

    Zazou67

    Joined:
    Nov 24, 2023
    Posts:
    38
    why a sphere ? my enemy is a cube, it's for that he's bug ? i show my problem wait few minutes please
     
  14. Zazou67

    Zazou67

    Joined:
    Nov 24, 2023
    Posts:
    38
    upload_2024-5-24_14-23-44.png my cube with green eye can not go up in my slope, but my little cube pink eye can go up :(, i want of my cube green eye can go up too...
     
  15. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,166
    firstly, mine was a sphere cos thats what i had to hand, it makes no difference if it was a 3d elaborate model or not. And acting like its an issue? You provided zero info, so, while i could have changed it to a cube to match, you never showed or mentioned anything (despite asking)

    if one cube goes up but not another, that doesnt make a lot of sense unless you have set them as different types and only told the pink one it can go up at 60 degrees, default is 45.
     
  16. Zazou67

    Zazou67

    Joined:
    Nov 24, 2023
    Posts:
    38
    sorry i've little ague, and i'm not pro, i'm beginner and young (less 18 years old), i don't know if the speed is important, and same for the mass...
     
  17. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,166
    tbh no .. with a mass of 100 and a speed of 1 it would still go up the slope. Age is irrelevant.. My first commercial application was age 13 and .... there was no internet.. cos Im OLD, most homes didnt have computers let alone modems or internet when i started. there was you, the manual.. and .. a lot of swearing
     
    Zazou67 likes this.
  18. Zazou67

    Zazou67

    Joined:
    Nov 24, 2023
    Posts:
    38
    Oh ok (i'm french and my level in english is not very perfect), i see, you think of the collider is a problem in that ? or it's my NavMesh :D, look :
    upload_2024-5-24_15-28-22.png
    upload_2024-5-24_15-29-45.png the cube green eye
    upload_2024-5-24_15-30-4.png the cube pink eye
     
  19. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,166
    OK so you said the slope was 60 degrees
    upload_2024-5-24_14-31-16.png

    you've told it to only go up at 55.3 degrees or less.
     
  20. Zazou67

    Zazou67

    Joined:
    Nov 24, 2023
    Posts:
    38
    my slope has 30 degrees, i'v doing for that my NavMesh has a max slope 30 degrees and same for my Agent, but that not function, it's not a problem of NavMesh i think... i don't know where's a problem... o_O
     
  21. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,166
    Id suggest finding a tutorial or two on navmeshes
     
    Zazou67 likes this.
  22. Zazou67

    Zazou67

    Joined:
    Nov 24, 2023
    Posts:
    38
    i'v doing that, that don't function, it's strange, you think of creat a script for generated a navmesh is a solution ?:(
     
  23. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,166
    i think you need to learn the art of debugging what its doing
    make a practice project to mess with stuff and make a very minimal version eg cube at bottom on a plane, an angle, and a plane to end on.. build the navmesh see if cube goes to destination
     
    Zazou67 likes this.