This collider has some illegal parameters. Choose 'Reset' in the component popup menu to fix it
2014-04-18 11:46
525 查看
先看一下面的一个帖子:http://forum.unity3d.com/threads/168714-Error-when-adding-a-BoxCollider-component。原文如下:
1 After calling myGamObject.AddComponent<BoxCollider>() I
get the error "This collider has some illegal parameters. Choose 'Reset' in the component popup menu to fix it" followed by "abb.IsValid()" and then "!isFinite(outDistanceForSort)", "!IsFinite(OutDistanceAlongView)" being printed over and over again.
There are no popup menus to click, like the error suggests. What is causing this and how do I fix
it?
2 Well I found the problem, but not the solution. myGamebject
is created by Instantiating another GameObject that was loaded using Resources.Load("path to mesh"). It looks like the mesh being loaded is getting corrupted, which is strange because I load it in other parts of the code in the same way without issue. The
corruption is screwing up the scaling of the transform and the scale values are either astronomical or NaN.
edit: Finally found the issue. If you set a game object's transform's parent to a transform that already
has a parent, the game object's scale flips out.
1 After calling myGamObject.AddComponent<BoxCollider>() I
get the error "This collider has some illegal parameters. Choose 'Reset' in the component popup menu to fix it" followed by "abb.IsValid()" and then "!isFinite(outDistanceForSort)", "!IsFinite(OutDistanceAlongView)" being printed over and over again.
There are no popup menus to click, like the error suggests. What is causing this and how do I fix
it?
2 Well I found the problem, but not the solution. myGamebject
is created by Instantiating another GameObject that was loaded using Resources.Load("path to mesh"). It looks like the mesh being loaded is getting corrupted, which is strange because I load it in other parts of the code in the same way without issue. The
corruption is screwing up the scaling of the transform and the scale values are either astronomical or NaN.
edit: Finally found the issue. If you set a game object's transform's parent to a transform that already
has a parent, the game object's scale flips out.
相关文章推荐
- 转:sock_ev——linux平台socket事件框架(logTrace) .
- Linux 挂载Windows下 某个磁盘上的目录
- 转:sock_ev——linux平台socket事件框架(基于数据报的测试程序) .
- outb,inb等I/O端口操作函数
- IO端口和IO内存的区别及分别使用的函数接口
- 转:sock_ev——linux平台socket事件框架(基于字节流的测试程序) .
- centos 命令刻录光盘
- hadoop 关闭进程时报错no 进程 to stop
- apache ab压力测试结果分析
- 分享Syslinux4USB 0.3源码——改自神雕大侠作品
- linux下的ssh配置
- Linux程序调试GDB——数据查看
- 更改命令库函数复制脚本-定制小型linux
- NC(Net cat ) 使用详解(用作文件传输,端口转发,反弹Shell)
- 如何借助OpenStack命令行工具管理虚拟机?
- Nginx配置文件经典教程分析
- 在Linux下查看Apache的负载情况
- windows 通过scp to linux
- Linux 下查看服务器CPU核数
- Linux系统命令Cut使用