Home > OS >  Unity adding navmesh agent but why does the navmeshagent area goes on top of the object?
Unity adding navmesh agent but why does the navmeshagent area goes on top of the object?

Time:03-15

I don't know why, but when I tried to give a ship a navmesh agent, when played it suddenly flipped From this Normal Ship To this Flippedship. And when I check it, it is because the area of the navmesh agent is on top of the ship like this.NavMeshAgent area for the ship. Is there anyway to change it?

CodePudding user response:

PlayerUnitShipRoot     <----NavMeshAgent
    PlayerUnitShip     <----Mesh Filter & Mesh Renderer
  1. Create a new GameObject (PlayerUnitShipRoot).

  2. Put your orignial model (PlayerUnitShip) under it.

  3. Add a NavMeshAgent on PlayerUnitShipRoot.

  4. Move and rotate PlayerUnitShip to a proper position.

  • Related