CapsuleCollider.height 高度

var height : float

Description描述

The height of the capsule meased in the object's local space.

胶囊的高度,基于物体的自身空间。

The capsule's height will be scaled by the transform's scale. Note that the height is the actual height including the half-spheres at each end.

如果修改变换的缩放,那么胶囊的高度也将改变。注意,高度指实际的高度,包含两端的半球。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		collider.height = 5;
	}
}
collider.height = 5;
Page last updated: 2010-12-21