CharacterController.center 中心

var center : Vector3

Description描述

The center of the character's capsule relative to the transform's position.

相对于变换位置的角色胶囊体的中心。

using UnityEngine;

using System.Collections;



public class example : MonoBehaviour {

	public CharacterController controller;

	public void Awake() {

		controller = GetComponent<CharacterController>();

		controller.center = new Vector3(0, 1, 0);

	}

}
// Move the center of the capsule up.

//将胶囊体的中心向上移动



var controller : CharacterController;

controller = GetComponent(CharacterController);

controller.center = Vector3(0, 1, 0);
Page last updated: 2010-12-14