Physics.minPenetrationForPenalty 最小渗透深度

static var minPenetrationForPenalty : float


The minimum contact penetration value in order to apply a penalty force (default 0.05). Must be positive.


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.minPenetrationForPenalty = 0.1F;
Physics.minPenetrationForPenalty = 0.1;
Page last updated: 2011-4-9