ドキュメント

Unity Engine

Unity Engine

collider

The collider that was hit by the controller.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.PhysicsModule
public Collider collider { get; }

Examples

using UnityEngine;public class Example : MonoBehaviour{ void OnControllerColliderHit(ControllerColliderHit hit) { // Call a damage function on the object we hit. hit.gameObject.SendMessage("ApplyDamage", 5); }}