CharacterController.height 高度

var height : float

Description描述

The height of the character's capsule

角色胶囊体的高度。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public CharacterController controller;
	public void Awake() {
		controller = GetComponent();
		controller.height = 2.0F;
	}
}
// Set the controller height to 2.0
//设置控制器的高度为2.0。

var controller : CharacterController;
controller = GetComponent(CharacterController);
controller.height = 2.0;
最后修改:2010年12月14日 Tuesday 13:37

本脚本参考基于Unity 3.4.1f5

英文部分版权属©Unity公司所有,中文部分© Unity圣典 版权所有,未经许可,严禁转载 。