主要原因是:两个相同对象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. VB 调用 webservice 出现:WSDLReader:Loading of the WSDL file failed HRESULT=0×80040154: 没有注册类别 解决方案

    有些 VB 程序在调用  webservice  的时候出现“WSDLReader:Loading of the WSDL file failed HRESULT=0×80040154: 没有注册类别 ...

  2. Java笔记Spring(九)

    完整调试springmvc源码 WebApplicationContext = new XmlWebApplicationContext();// XmlWebApplicationContext通过 ...

  3. jvisualvm远程连接

    1. 今天用jvisualvm远程连接linux上的jdk,jxm方式没有连接成功,后来发现是tomcat安装目录bin下的catalina.sh文件下的JAVA_OPTS中内容格式不对,要有空格,修 ...

  4. Linux系统中的计划任务

    在系统的工作管理中,我们经常会有需要去告诉电脑某些特定的时间执行一些操作,比如定时提醒工作人员需要做什么事情,或者在每天凌晨进行文件备份等等.这就需要某些命令来达成计划任务. 计划任务可以大体上分成两 ...

  5. C语言,链表操作

    #include "stdafx.h" #include <stdio.h> #include <stdlib.h> #include <string ...

  6. c# 复制整个文件夹的内容,Copy所有文件

    /// <summary> /// 文件夹下所有内容copy /// </summary> /// <param name="SourcePath"& ...

  7. Jmeter使用插件监控服务器资源的使用情况

    环境准备 客户端: 1)安装最新版的Jmeter,目前为 Jmeter5.0 2)安装插件管理器:JMeterPlugin jmeter-plugins-manager.jar下载完成之后,将下载的j ...

  8. 转: Ext.data.Store 修改Post请求

    Extjs 4.0版本 var Store = Ext.create('Ext.data.Store', { pageSize: pageSize, model: 'Ext.data.Model名称' ...

  9. 用Nginx+Lua+Redis给百度鹰眼API服务搭建缓存服务中间件(记录过程)

    一.环境安装部分 Centos7,Nginx1.14,Redis5.0,luajit-2.1,ngx_devel_kit-0.3.1rc1,lua-nginx-module-0.10.14. 下载安装 ...

  10. (转)Thinkpad X1 Carbon 扩展硬盘

    http://tieba.baidu.com/p/5837920925 网上看到有人成功利用X1C空闲的4G模块来实现了扩充用的是东芝RC100或者建兴的T11 其实难点应该是2242这种尺寸的SSD ...