ControllerColliderHit.controller 控制器

var controller : CharacterController

Description描述

The controller that hit the collider

碰到碰撞器的控制器。

using UnityEngine;

using System.Collections;



public class example : MonoBehaviour {

	void OnControllerColliderHit(ControllerColliderHit hit) {

		hit.controller.detectCollisions = false;

	}

}
// CharacterControllers we touch, disable collision detection.

//角色控制器我们触碰,禁用碰撞检测。

function OnControllerColliderHit(hit : ControllerColliderHit) {

	hit.controller.detectCollisions = false;

}
Page last updated: 2010-12-23