CharacterController.collisionFlags 碰撞标识

var collisionFlags : CollisionFlags

Description描述

What part of the capsule collided with the environment during the last CharacterController.Move call.

在最后的CharacterController.Move调用期间,胶囊体的哪个部分与周围环境相碰撞。

还没有添加代码
function Update () {
	var controller : CharacterController = GetComponent(CharacterController);
	if ((controller.collisionFlags & CollisionFlags.Above) != 0)
		print("touched the ceiling");
}
Page last updated: 2010-12-14