Rigidbody.mass 质量

var mass : float

Description描述

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