Version: 2022.3
言語: 日本語

WheelCollider

class in UnityEngine

/

継承:Collider

マニュアルに切り替える

説明

ホイール状のコライダーです。

Wheel collider is used to model vehicle wheels. It simulates a spring and damper suspension setup, and uses a slip based tire friction model to calculate wheel contact forces.

Wheel's collision detection is performed by casting a ray from center downwards the local y-axis. The wheel has a radius and can extend downwards by suspensionDistance amount.

ホイールは motorTorquebrakeTorquesteerAngle により制御できます。

Wheel collider computes friction separately from the rest of physics engine, using a slip based friction model. This allows for more realistic behaviour, but makes wheel colliders ignore standard PhysicMaterial settings. Simulation of different road materials is done by changing the forwardFriction and sidewaysFriction based on what material the wheel is hitting. See Also: GetGroundHit and WheelFrictionCurve.

変数

brakeTorqueブレーキトルクは、ニュートンメートルで表されます。
centerローカル座標でのコライダーの中心座標を返す
forceAppPointDistanceサスペンションとタイヤの力の作用点は静止しているホイールの台から測定されます。
forwardFrictionホイールの進行方向の摩擦を返す
isGroundedホイールが何かと衝突しているかを返す(読み込み専用)
massキログラムで表された、ホイールの質量。 0 より大きくしなければいけません。良く使われる値の範囲は (20,80) です。
motorTorqueN・m(ニュートンメートル)で表される車軸のモータートルク。方向に応じて正か負のどちらかです。
radiusローカル座標でのコライダーの半径を返す
rotationSpeedRotation speed of the wheel, measured in degrees per second.
rpm1 分に回転する数を返す(読み取り専用)
sidewaysFrictionホイールの横方向の摩擦を返す
sprungMassこの WheelCollider でサポートされている質量
steerAngleハンドルの角度を返す。常にローカル座標の Y 軸になる
suspensionDistanceローカル座標でのサスペンションの最大の長さを返す
suspensionExpansionLimitedLimits the expansion velocity of the Wheel Collider's suspension. If you set this property on a Rigidbody that has several Wheel Colliders, such as a vehicle, then it affects all other Wheel Colliders on the Rigidbody.
suspensionSpringホイールサスペンションのパラメータ。サスペンションは、直線力と減衰力が与えられる事で、目的の座標に届こうとします。
wheelDampingRateホイールの質量。0 より大きい必要がある

Public 関数

ConfigureVehicleSubsteps車両のサブステップのパラメーターを構成します。
GetGroundHit衝突したときの情報を取得します
GetWorldPose接地、サスペンションの制限、ステアリングの角度、回転の角度 (角度の単位は度) のためにホイールをカウントするワールド空間ポーズを取得します。
ResetSprungMassesReset the sprung masses of the vehicle.

継承メンバー

変数

attachedArticulationBodyThe articulation body the collider is attached to.
attachedRigidbodyコライダーがアタッチされている Rigidbody
boundsThe world space bounding volume of the collider (Read Only).
contactOffsetコライダーの接触するオフセット値
enabledEnabled Colliders will collide with other Colliders, disabled Colliders won't.
excludeLayersThe additional layers that this Collider should exclude when deciding if the Collider can contact another Collider.
hasModifiableContactsSpecify whether this Collider's contacts are modifiable or not.
includeLayersThe additional layers that this Collider should include when deciding if the Collider can contact another Collider.
isTriggerSpecify if this collider is configured as a trigger.
layerOverridePriorityA decision priority assigned to this Collider used when there is a conflicting decision on whether a Collider can contact another Collider.
materialコライダーによって使用されるマテリアル
providesContactsWhether or not this Collider generates contacts for Physics.ContactEvent.
sharedMaterialこのコライダーの共有物理マテリアル
gameObjectこのコンポーネントはゲームオブジェクトにアタッチされます。コンポーネントはいつもゲームオブジェクトにアタッチされています。
tagゲームオブジェクトのタグ
transformThe Transform attached to this GameObject.
hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameオブジェクト名

Public 関数

ClosestPointReturns a point on the collider that is closest to a given location.
ClosestPointOnBounds設定したポイントから一番近い、Bounds オブジェクトのポイント
Raycastこのコライダーのみを判断する Ray を飛ばします。他のコライダーは無視されます。
BroadcastMessageゲームオブジェクトまたは子オブジェクトにあるすべての MonoBehaviour を継承したクラスにある methodName 名のメソッドを呼び出します。
CompareTagChecks the GameObject's tag against the defined tag.
GetComponentGets a reference to a component of type T on the same GameObject as the component specified.
GetComponentInChildrenGets a reference to a component of type T on the same GameObject as the component specified, or any child of the GameObject.
GetComponentInParentGets a reference to a component of type T on the same GameObject as the component specified, or any parent of the GameObject.
GetComponentsGets references to all components of type T on the same GameObject as the component specified.
GetComponentsInChildrenGets references to all components of type T on the same GameObject as the component specified, and any child of the GameObject.
GetComponentsInParentGets references to all components of type T on the same GameObject as the component specified, and any parent of the GameObject.
SendMessageゲームオブジェクトにアタッチされているすべての MonoBehaviour にある methodName と名付けたメソッドを呼び出します
SendMessageUpwardsゲームオブジェクトと親(の親、さらに親 ... )にアタッチされているすべての MonoBehaviour にある methodName と名付けたメソッドを呼び出します
TryGetComponentGets the component of the specified type, if it exists.
GetInstanceIDGets the instance ID of the object.
ToStringReturns the name of the object.

Static 関数

DestroyRemoves a GameObject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindAnyObjectByTypeRetrieves any active loaded object of Type type.
FindFirstObjectByTypeRetrieves the first active loaded object of Type type.
FindObjectOfTypeタイプ type から最初に見つけたアクティブのオブジェクトを返します
FindObjectsByTypeRetrieves a list of all loaded objects of Type type.
FindObjectsOfTypeGets a list of all loaded objects of Type type.
Instantiateoriginal のオブジェクトをクローンします

Operator

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

メッセージ

OnCollisionEnterこの collider/rigidbody は他の collider/rigidbody に触れたときに OnCollisionEnter は呼び出されます。
OnCollisionExitこの collider/rigidbody が他の collider/rigidbody と触れ合うのをやめたときに OnCollisionExit は呼び出されます。
OnCollisionStayOnCollisionStay is called once per frame for every Collider or Rigidbody that touches another Collider or Rigidbody.
OnTriggerEnterWhen a GameObject collides with another GameObject, Unity calls OnTriggerEnter.
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.