Welcome!

Welcome to our community forums, full of great people, ideas and excitement. Please register if you would like to take part.

This is extra text with a test link..

Register Now

Announcement

Collapse
No announcement yet.

Enemies Can't Reach Player On Deck

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Enemies Can't Reach Player On Deck

    The AI seems to be struggling when trying to attack the player on the deck. They will run in circles or turn very slowly when aiming at the player as if they're caught on something. While testing it out, one of them also managed to walk in the deck as if walking on the grass plane underneath it, going through furniture. I think it has to do with the spotty coverage of the navmesh on the deck but I'm not sure how to fix it.


  • #2
    Yup, for sure. Everywhere that you can't see the navmesh is a place where the AI cannot run. So it's likely that the AI can't get up on the stairs.

    You can clear off some of that furniture off the deck (which would mean more places that the AI could run), you can also change your bake settings to allow for a higher step to be seen as a step, and tighter radii to the navmesh is closer to the obstacles.

    Comment


    • #3
      I'm having a smilar NavMesh problem so I thought I could post it in this forum.

      My enemies are going through the decks instead of stepping onto them. I tried adjusting the step height, but they are still phasing through the deck. I also noticed that the NavMeshAgent is going up the steps, but the enemy itself isn't. I'm not sure what could be causing this.

      Comment


      • #4
        You're probably missing:

        Code:
            void OnAnimatorMove ()
            {
                // Update position based on animation movement using navigation surface height
                Vector3 position = anim.rootPosition;
                position.y = agent.nextPosition.y;
                transform.position = position;
            }

        Comment

        Working...
        X