Bounds.Bounds 边界框

static function Bounds (center : Vector3, size : Vector3) : Bounds

Description描述

Creates new Bounds with a given center and total size. Bound extents will be half the given size.

用给定的中心和总大小,创建一个新的边界框。边界框extents将是给定size的一半。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public Bounds bounds = new Bounds(Vector3.zero, new Vector3(1, 2, 1));
}
// Create pillar bounding box centered at the origin
//在原点创建一个柱形边界框
var bounds = Bounds (Vector3.zero, Vector3 (1, 2, 1));
Page last updated: 2010-12-29