CapsuleCollider.center 中心

var center : Vector3

Description描述

The center of the capsule, measured in the object's local space.

胶囊的中心,基于物体的自身坐标空间。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		collider.center = Vector3.zero;
	}
}
// Reset the center to the transform's position
//重设中心点到变换的位置
collider.center = Vector3.zero;
Page last updated: 2010-12-21