惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
有赞技术团队
有赞技术团队
J
Java Code Geeks
H
Hackread – Cybersecurity News, Data Breaches, AI and More
美团技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Hugging Face - Blog
Hugging Face - Blog
人人都是产品经理
人人都是产品经理
酷 壳 – CoolShell
酷 壳 – CoolShell
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
C
Check Point Blog
博客园 - 【当耐特】
The GitHub Blog
The GitHub Blog
Recent Announcements
Recent Announcements
The Cloudflare Blog
Microsoft Azure Blog
Microsoft Azure Blog
腾讯CDC
Vercel News
Vercel News
IT之家
IT之家
MyScale Blog
MyScale Blog
博客园_首页
Martin Fowler
Martin Fowler
WordPress大学
WordPress大学
罗磊的独立博客

博客园 - BackSword

unity ui canvas shader texcoord.zw is not used for ui particle 问题记录,unity shaderlab 模版写入问题 textmeshpro 放大缩小出现黑色边框问题,修改shader FXAA 在桌面平台更高效的原因,MSAA在手机端更高效 glados优惠码 C# Array.Fill 值类型优化。 git 设置github代理 win10 ctrl+space 快捷键冲突问题 msvc C++编译链接 切线空间 c++局部静态变量是线程安全的 c++函数参数和返回值 c++返回值不能是右值对象 状态同步 分享mkgmttime自实现功能。 关于socket通信中大小端转换问题 wpf clickonece 坑 [修复] 启动期间超频失败的错误信息 template return value error C2440: “初始化”: 无法从“const T”转换为“const Player *&”
unity physics bug
BackSword · 2024-07-18 · via 博客园 - BackSword

This happens because a Rigidbody is being added to a GO with zero scale. Zero scale collider means there wont' be a well defined inertia tensor, which is essential for dynamics actually. There are warnings printed in the console.
当前游戏内用了对象池缓存物理对象,但物理对象有mesh动画,动画结束 gameobject scale = 0;
当对象回池的状态,scale = 0, active = false, 并设置物理一些参数。
当从对象池取出的 scale = 0, active = true,
scale = 1
fixupdate first time postion ok
fixupdate second time position nan
update position nan.

  1. 建议解决方案,动画 最后scale = 0.01。
  2. 回池的时候 scale 置为 1.
    https://forum.unity.com/threads/intermittent-infinity-or-nan-floating-point-numbers.1444306/

pc 运行良好,iphone 和 android failed.

当此对象 position nan 之后, physics.raycast 拾取不到正常的对象。

1 为解决问题的根本。 2. 是临时解决方法。

unity 2021.3.*