- bounceThreshold
- CapsuleCastAll
- CapsuleCast
- CheckCapsule
- CheckSphere
- GetIgnoreLayerCollision
- gravity
- IgnoreCollision
- IgnoreLayerCollision
- Linecast
- maxAngularVelocity
- minPenetrationForPenalty
- OverlapSphere
- RaycastAll
- Raycast
- sleepAngularVelocity
- sleepVelocity
- solverIterationCount
- SphereCastAll
- SphereCast
Physics.solverIterationCount 求解迭代次数
static var solverIterationCount : int
Description描述
The default solver iteration count permitted for any rigid bodies (default 7). Must be positive.
默认的求解迭代次数允许使用任意刚体(默认为7)。必须为正数。(可以纠正关节间连接的错误行为)
The solverIterationCount determines how accurately joints and contacts are resolved. If you are having trouble with connected bodies oscillating and behaving erratically setting a higher solver iteration count may improve their stability (but is slower). Usually a value of 7 works very well for almost all situations.
solverIterationCount决定了关节和接触点有多精确。可以纠正关节间连接的错误行为。如果关节刚体有摇摆现象和行为杂乱,为solverIterationCount设置一个较高的值将改善他们的稳定性。通常情况下设置为7.
This value is usually changed in Edit->Project Settings->Physics inspector instead of from scripts.
这个值常在Edit->Project Settings->Physics 菜单下设定,而不用在脚本中。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void Awake() {
Physics.solverIterationCount = 10;
}
}
Physics.solverIterationCount = 10;