Version: 2017.1
public Collider collider ;

描述

被该控制器撞击的碰撞体。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void OnControllerColliderHit(ControllerColliderHit hit) { hit.gameObject.SendMessage("ApplyDamage", 5); } }