Rigidbody.mass 质量

var mass : float


The mass of the rigidbody.


You should strive to keep mass close to 0.1 and never more than 10. Large masses make physics simulation unstable.

你应该 尽量保持质量接近0.1并且不要超过10。大的质量会使物理模拟不稳定。

Higher mass objects push lower mass objects more when colliding. Think of a big truck, hitting a small car.


A common mistake is to assume that heavy objects fall faster than light ones. This is not true as the speed is dependent on gravity and drag.


using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		rigidbody.mass = 0.5F;
rigidbody.mass = 0.5;
Page last updated: 2011-1-29