碰撞/刚体在小物体上不能正常工作

Collision / Rigidbody not working properly in small objects

我有一个简单的多米诺骨牌场景,您可以在其中单击多米诺骨牌并用力敲击它。 起初我有这个多米诺骨牌的比例为 (x=0.1), (y=0.6), (z=0.3) 1 应该是 1 米,他们倒下没有问题但太慢了。根据关于 Rigidbody 的统一文档,这完全有道理。

Use the right size. The size of the your GameObject’s mesh is much more important than the mass of the Rigidbody. If you find that your Rigidbody is not behaving exactly how you expect - it moves slowly, floats, or doesn’t collide correctly - consider adjusting the scale of your mesh asset. Unity’s default unit scale is 1 unit = 1 meter, so the scale of your imported mesh is maintained, and applied to physics calculations. For example, a crumbling skyscraper is going to fall apart very differently than a tower made of toy blocks, so objects of different sizes should be modeled to accurate scale.

所以我只是将多米诺骨牌的大小重新调整为 (x=0.01)、(y=0.06)、(z=0.03),这次它们落到了所需的速度,但由于某种原因它们停止落下并且没有落下敲下一张多米诺骨牌。

example GIF

我不知道为什么会这样,但我猜这是因为在计算物理时,引擎不会浪费太多资源来计算可能甚至看不到的小物体由用户。

修改质量似乎没有做任何事情,draw 和 angular draw 都是 0 并且已经尝试了所有碰撞检测模式。

对此有任何解决方案或解决方法吗?

根据我的经验,Unity 物理不喜欢太小的对象,因为它会引入舍入误差。游戏模拟通常不需要与您尝试登陆火星时相同的准确性。因此,我通常避免使用小于 0.1f 的刻度。

在你的情况下,我会将比例保持在 1.0f,而不是尝试增加世界引力,将其从默认的 -9.81f 更改为 -98.1f(编辑 - 项目设置 - 物理)。或者将默认时间比例从 1f 更改为 5f(编辑 - 项目设置 - 时间)。

尽量不要在一开始就做出太大的改变,因为它可能会给游戏的其他部分带来奇怪的影响。