Version: 2020.2

Rigidbody.solverIterations

切换到手册
public int solverIterations ;

描述

solverIterations 确定刚体关节与碰撞接触点的解析精确度。它将重写 Physics.defaultSolverIterations。必须为正值。

当连接的刚体出现摆动和行为异常时, 设置更高的解算器迭代次数也许能够改进其稳定性(但会降低速度)。

另请参阅:Rigidbody.solverVelocityIterations

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Start() { Rigidbody rb = GetComponent<Rigidbody>(); rb.solverIterations = 30; } }