经常会遇见布娃娃散架的问题
参考官方文档Joint and Ragdoll stability
修改代码如下:
ConfigurableJoint[] cj = GetComponentsInChildren<ConfigurableJoint>();
foreach (var c in cj)
{
c.projectionMode = JointProjectionMode.PositionAndRotation;
c.enablePreprocessing = false;
var r = c.GetComponent<Rigidbody>();
}
这样在角速度过高的情况下依然会散架,控制角速度就基本上不会散架了(更多的细节需要继续参考官方文档)
本文介绍了一种解决Unity中布娃娃模型在高角速度下出现散架问题的方法。通过调整ConfigurableJoint组件的projectionMode和enablePreprocessing属性,并控制角速度,可以有效避免模型散架。

1844

被折叠的 条评论
为什么被折叠?



