News Forums RAIN General Discussion and Troubleshooting Navigation Target & AI moving issues

Tagged: 

This topic contains 11 replies, has 3 voices, and was last updated by  prime 11 months, 1 week ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #9350

    RobEls
    Participant

    I don’t know why this isn’t working as I’ve got the exact same setup working in another project yet when I recreated in my current project my A.I. won’t follow the navigation target placed on my character.

    I keep getting this message non stop in my console
    “Look rotation viewing vector is zero
    UnityEngine.Quaternion:LookRotation(Vector3)”

    If I go up and push my enemy capsule away, the message will stop spamming and the A.I. will rotate and walk back towards it’s starting position (0,1,5) and when reaching it will start with the console messages again.

    The Nav Target is attached to my UFPS player camera object so it’s location is (0,0,0).

    Any suggestions on where abouts I’ve gone wrong?

    Below are some screenshots if they help.

    Screenshot 1

    Screenshot 2

    #9437

    RobEls
    Participant

    I’ve kept fiddling and I just cannot get it to work, it’s doing my head in knowing that it worked on the previous project yet I’ve done nothing different this time around different.

    I’ve even deleted the entire ai, and recreated it follow the steps in the first tutorial video and it’ll animate in the stupid walk position but it just won’t move to the waypoint.

    #9618

    prime
    Keymaster

    That’s with 2.0.10?

    #9620

    RobEls
    Participant

    Yes 2.0.10.2399.

    The A.I. just won’t move to any target or waypoint, it’ll do any actions set before or after move but the move one just does nothing.

    #9625

    RobEls
    Participant

    Huh can’t see an edit button for my posts.

    I just started a new project and quickly setup a scene and imported only Rain, the result is the same. The AI will only move back to it’s starting location and not the nav target.

    Here’s a video recording of the whole to hopefully give a full understanding of what is going on.

    I’ll try re-downloading the rain asset tomorrow and if that fails again I’ll reinstall Unity although I don’t think that would be the problem.

    #9626

    RobEls
    Participant

    Okay video URL didn’t seem to post either? :S

    )

    #9630

    prime
    Keymaster

    I didn’t see a navmesh. You probably need to either add a navmesh or turn off “valid path required” on your AI.

    #9632

    RobEls
    Participant

    Ah thank you so much. Rather confusing because I remember messing around with the valid path setting when I was trying to test out everything and it didn’t seem to work at the time.

    I just generated a nav mesh and it didn’t work but turning off valid path required did. Any idea on what I’m doing wrong with the nav mesh as I’m sure it’s my fault. I’m an idiot, the nav mesh wasn’t excluding the A.I. layer. Thanks a lot again.

    • This reply was modified 2 years ago by  RobEls.
    #37041

    fuzzewuzze
    Participant

    This bug still happens FYI, for me the only way to get it to work was to make the location my AI was walking too not be 0,1,0. If i make it say 5,1,3 or something else it works every time. Its like at 0,1,0 the AI doesnt know which way to go.

    #37045

    prime
    Keymaster

    @fuzzewuzze - make sure there isn’t a hole in the navmesh at 0,1,0. If the AI was in the scene at that position when you generated the navmesh, there might be.

    #37049

    fuzzewuzze
    Participant

    The AI is instantiated there, but its done on a script at init. The entire navmesh is empty when the map loads.

    #37078

    prime
    Keymaster

    @fuzzewuzze - can you explain your setup in a little more detail? Are you procedurally generating the map and navmesh? Or do just mean that your scene has a navmesh that fully covers the walkable area? Is anything being moved around at runtime? (the navmesh, terrain, or ground planes?)

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

You must be logged in to reply to this topic.