在 Unity 场景中,想象一下
在现实生活中,木棍会站在那里(首先,这在 PhysX 中实际上很难实现),当大物体击中它们时,
我发现这在 Unity 中很难做到。
通常你会说:“给大物体一个几千的质量,而木棍的质量只有一到两公斤”。
然而我发现这确实行不通- 棍子确实会使大型滑动物体旋转。
如果您将大型物体的角阻力设置得较高,那么这并不是您想要的其他行为。
在第一个例子中,我将棍子做成了运动学(这样它们就会站起来而不会摔倒),然后当大物体敲击它时..
protected void OnCollisionEnter(Collision collisionInfo) {
rb.isKinematic = false;
}
也许唯一的方法是
如何在 Unity/PhysX 环境中执行此操作?
(将我的评论转换为答案)
Small objects will affect large object in real life, but just slightly (so maybe there are too many sticks?). Or maybe the problem is in the way sticks are stuck into the ground? I've created test scene with cube (1000 kg) and some cylinders (1 kg). All objects are just standing freely on the ground. Here what it looks like when the cube hits cylinders:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)