Forum rules - please read before posting.

Problem is with player and NPCs

I created a player and a character using Character Wizard. Everything is as in the manual and video on YouTube. But the problem is that the player does not bypass the character but passes through it. What am I doing wrong?

Comments

  • What are your AC/Unity versions, is this for a 2D or a 3D game, and is the Player moving due to pathfinding or Direct control (i.e. WASD)?

    You'll need to check that both your Player and NPCs have the correct collider and physics components. If you're making a 3D game, they'll need to have both Rigidbody and Capsule Collider components - though these can be replaced by a single Character Controller as well.

    If you can share screenshots of your character Inspectors, I'll try to see what the issue is.

  • edited May 2023

    Don't pay attention to the collider around the dog, I tried to temporarily put a pit in the mesh collider.

  • In 2D, Rigidbody components aren't necessary for character evasion - since the NavMesh can be set to avoid character collisions.

    First though, your NPC will need a Circle Collider 2D component on their root, centered around their feet - just like that on your Player prefab.

    Once set, you can then select your scene's NavMesh and enable the "Character evasion" setting. That will avoid the need to manually draw a NavMesh hole around the NPC - AC will do this automatically.

  • edited May 2023

    Thanks! I figured out what the problem was. In my navigation mesh, evasion was configured only stationary characters because we don't have animation to save resources. But it didn't work. The choice of all the characters helped.

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.