主要原因是:两个相同对象navmesh点太近造成。

解决方案:通过NavMesh.SamplePosition 获得可以行走点

for(int i = ;i<;i++)
{
float fRadius = Random.Range(, mRadius);
float fAngle = Random.Range(, 3.14f); Vector3 v3 = mStartPos;
v3.x += Mathf.Sin(fAngle) * fRadius;
v3.z += Mathf.Cos(fAngle) * fRadius; NavMeshHit hit;
if(NavMesh.SamplePosition(v3, out hit, mRadius, ))
{
GameObject p = Instantiate<GameObject>(mCat, hit.position, Quaternion.identity, transform);
if (p != null)
{
NavMeshAgent agent = p.AddComponent<NavMeshAgent>();
if(agent!=null)
{
agent.speed = 5.0f;
}
mCatList.Add(p);
}
} }

Failed to create agent because it is not close enough to the NavMesh的更多相关文章

  1. Failed to create AppDomain 'xxx'. Exception has been Failed to create AppDomain

    一服务器上的数据库全部被置于紧急模式(EMERGENCY),在错误日志里面能看到大量下面的错误 Failed to create AppDomain "YourSQLDba.dbo[runt ...

  2. build.fxbuild打不开 Failed to create the part's controls

    Failed to create the part's controls 以文本形式打开之后,发现编码的地方不是常用编码 将之修改为GBK 然后就可以正常打开了 最后把eclipse中的编码统一设置为 ...

  3. pip/easy_install failure: failed to create process

    使用pip install requests安装requests, 报错: failed to create process 解决方法: 执行Python -m pip install --upgra ...

  4. 运行easy_install安装python相关程序时提示failed to create process

    运行easy_install安装python相关程序时提示failed to create process,因为安装了两个python,卸载了的那个目录没删除,删除了另外的python目录后这个问题就 ...

  5. Failed to create the Java Virtual Machine.问题的解决

    运行Eclipse,出现了"Failed to create the Java Virtual Machine."错误: 解决的办法是在Eclipse的解压目录下找到eclipse ...

  6. eclipse failed to create the java virtual machine 问题图文解析

    eclipse failed to create the java virtual machine 问题图文解析 分类: java常用软件异常2010-10-02 23:45 73200人阅读 评论( ...

  7. Failed to create the part's controls [eclipse]

    查看源码 出现 Failed to create the part's controls 解决方法: eclipse.ini  中添加: -startup plugins/org.eclipse.eq ...

  8. android studio 开启genymotion 出现"failed to create framebuffer image"

    出现错误 Unable to start the virtul device To start virtual devices, make sure that your video card supp ...

  9. AX2012 R3 Data upgrade checklist sync database step, failed to create a session;

    最近在做AX2012 R3 CU9 到CU11的upgrade时 (用的Admin帐号), 在Date upgrade 的 synchronize database 这步 跑了一半,报出错误 说“fa ...

随机推荐

  1. hive动态分区问题--分区为中文

    报错如下: Loading data to table data_da.tmp_wlw_test partition (stat_date=2017-05-11, business_type_name ...

  2. shell编程变量介绍与表达式详解

    shell变量简介 变量是任何一种编程语言都必不可少的组成部分,变量用来存放各种数据.脚本语言在定义变量时通常不需要指明类型,直接赋值就可以,Shell 变量也遵循这个规则. 在 Bash shell ...

  3. Vue 使用axios获取数据

    axios  的使用 1.安装  cnpm  install  axios --save 2.哪里用哪里引入axios <script> import Axios from 'axios' ...

  4. PackagesNotFoundError: The following packages are not available from current channels

    因为要用到lifelines 包,在cmd中使用conda install lifelines ,显示如下错误: PackagesNotFoundError: The following packag ...

  5. leetcode每日刷题计划-简单篇day11

    Num 121 买卖股票的最佳时期 Best Time to Buy and Sell Stock class Solution { public: int maxProfit(vector<i ...

  6. Struts2高位漏洞升级到struts2.3.32

    Struts2高位漏洞升级到struts2.3.32 3月7日带来了一个高危漏洞Struts2漏洞——CVE编号CVE-2017-5638.其原因是由于Apache Struts2的Jakarta M ...

  7. hive join on 条件 与 where 条件区别

    1. select * from a left join b on a.id = b.id and a.dt=20181115; 2. select * from a left join b on a ...

  8. 啊哈算法第四章第二节解救小哈Java实现

    package corejava; public class FourTwo { static int m;//(m,n)为几行几列 static int n; static int p;//(p,q ...

  9. Spring事务实现分析

    一.Spring声明式事务用法 1.在spring配置文件中配置事务管理器 <bean id="baseDataSource" class="com.alibaba ...

  10. C# 拖拽事件

    实现一个textBox像另一个TextBox拖拽数据. 一个控件想要被拖入数据的前提是AllowDrop属性为true. 所以,首先需要将被拖入数据的textBox的AllowDrop属性设置为Tru ...