Version: 2018.1

MeshCollider

class in UnityEngine

/

継承:Collider

マニュアルに切り替える

説明

メッシュコライダーによりメッシュとプリミティブの間の 衝突判定 が実現できます。

変数

convex凸状のコライダーの有効/無効
cookingOptionsOptions used to enable or disable certain features in mesh cooking.
inflateMeshAllow the physics engine to increase the volume of the input mesh in attempt to generate a valid convex mesh.
sharedMesh衝突を検出するために使用されるメッシュを返します
skinWidthUsed when set to inflateMesh to determine how much inflation is acceptable.

継承メンバー

変数

attachedRigidbodyコライダーがアタッチされている Rigidbody
boundsThe world space bounding volume of the collider (Read Only).
contactOffsetコライダーの接触するオフセット値
enabledEnabled Colliders will collide with other Colliders, disabled Colliders won't.
isTriggerコライダーがトリガーかどうか
materialコライダーによって使用されるマテリアル
sharedMaterialこのコライダーの共有物理マテリアル
gameObjectこのコンポーネントはゲームオブジェクトにアタッチされます。コンポーネントはいつもゲームオブジェクトにアタッチされています。
tagゲームオブジェクトのタグ
transformThe Transform attached to this GameObject.
hideFlagsオブジェクトは非表示、シーンに保存、ユーザーが編集可能、などを設定する。
nameオブジェクト名

Public 関数

ClosestPointReturns a point on the collider that is closest to a given location.
ClosestPointOnBounds設定したポイントから一番近い、Bounds オブジェクトのポイント
Raycastこのコライダーのみを判断する Ray を飛ばします。他のコライダーは無視されます。
BroadcastMessageゲームオブジェクトまたは子オブジェクトにあるすべての MonoBehaviour を継承したクラスにある methodName 名のメソッドを呼び出します。
CompareTagこのゲームオブジェクトは tag とタグ付けされているかどうか
GetComponentゲームオブジェクトに type がアタッチされている場合は type のタイプを使用してコンポーネントを返します。ない場合は null です
GetComponentInChildren GameObject や深さ優先探索を活用して、親子関係にある子オブジェクトから type のタイプのコンポーネントを取得します。
GetComponentInParent GameObject や深さ優先探索を活用して、親子関係にある親オブジェクトから type のタイプのコンポーネントを取得します。
GetComponents GameObject から type のタイプのコンポーネントを「すべて」取得します。
GetComponentsInChildren GameObject や深さ優先探索を活用して、親子関係にある子オブジェクトから type のタイプのコンポーネントを「すべて」取得します。
GetComponentsInParent GameObject や深さ優先探索を活用して、親子関係にある親オブジェクトから type のタイプのコンポーネントを「すべて」取得します。
SendMessageゲームオブジェクトにアタッチされているすべての MonoBehaviour にある methodName と名付けたメソッドを呼び出します
SendMessageUpwardsゲームオブジェクトと親(の親、さらに親 ... )にアタッチされているすべての MonoBehaviour にある methodName と名付けたメソッドを呼び出します
GetInstanceIDオブジェクトのインスタンス ID を返します
ToStringReturns the name of the GameObject.

Static 関数

Destroyゲームオブジェクトやコンポーネント、アセットを削除します
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoad新しいシーンを読み込んでもオブジェクトが自動で破壊されないように設定します
FindObjectOfTypeタイプ type から最初に見つけたアクティブのオブジェクトを返します
FindObjectsOfTypeタイプから見つけたすべてのアクティブのオブジェクト配列を返します
Instantiateoriginal のオブジェクトをクローンします

Operator

boolオブジェクトが存在するかどうか
operator !=二つのオブジェクトが異なるオブジェクトを参照しているか比較します
operator ==2つのオブジェクト参照が同じオブジェクトを参照しているか比較します。

メッセージ

OnCollisionEnterこの collider/rigidbody は他の collider/rigidbody に触れたときに OnCollisionEnter は呼び出されます。
OnCollisionExitこの collider/rigidbody が他の collider/rigidbody と触れ合うのをやめたときに OnCollisionExit は呼び出されます。
OnCollisionStayOnCollisionStay は rigidbody/collider が他の rigidbody/collider に触れている間毎フレーム 1 度だけ呼び出されます。
OnTriggerEnter OnTriggerEnter is called when the Collider other enters the trigger.
OnTriggerExit Collider が other のトリガーに触れるのをやめたときに OnTriggerExit は呼び出されます。
OnTriggerStayOnTriggerStay is called almost all the frames for every Collider other that is touching the trigger. The function is on the physics timer so it won't necessarily run every frame.