2D スプライトのための Rigidbody 物理挙動 コンポーネント
要するに Rigidbody2D クラスは Rigidbody が 3D で提供する機能と同じものを 2D で提供します。スプライトに Rigidbody2D コンポーネントを追加することで物理エンジンによる影響を受けるようになります。つまりスプライトは重力による影響を受け、力によってスクリプトで制御できます。適切な コライダー コンポーネント を追加することでスプライトは他のスプライトとの衝突に反応するようになります。この挙動は Unity の物理挙動のシステムから全面的に導出されるものです。魅力的でリアルな物理挙動のために必要なコードはわずかであり、ゲームの中で明示的にコーディングしてないにも関わらず新鮮なゲームプレイを実現できます。 See Also: Rigidbody クラス, SpriteRenderer クラス, Collider2D クラス, Joint2D クラス
| angularDrag | Angular Drag の係数 |
| angularVelocity | 角度 / 秒で示される角速度 |
| centerOfMass | The center of mass of the rigidBody in local space. |
| collisionDetectionMode | The method used by the physics engine to check if two objects have collided. |
| drag | Drag 係数 |
| fixedAngle | Rigidbody の回転をさせず固定させるか |
| gravityScale | オブジェクトが重力により影響を受ける度合い |
| inertia | The rigidBody rotational inertia. |
| interpolation | 物理挙動の Update の間で使用される補間 |
| isKinematic | Rigidbody が物理挙動の影響を受けるか |
| mass | Rigidbody の重さ |
| position | Rigidbodyオブジェクトの位置 |
| rotation | Rigdibodyオブジェクトの回転値。 |
| simulated | Indicates whether the rigid body should be simulated or not by the physics system. |
| sleepMode | The sleep state that the rigidbody will initially be in. |
| velocity | Linear velocity of the rigidbody. |
| worldCenterOfMass | Gets the center of mass of the rigidBody in global space. |
| AddForce | Rigidbody に力を適用します |
| AddForceAtPosition | 空間上の指定地点で力を加えます |
| AddRelativeForce | Adds a force to the rigidbody2D relative to its coordinate system. |
| AddTorque | Rigidbody の重心にトルクを適用します |
| GetPoint | Get a local space point given the point point in rigidBody global space. |
| GetPointVelocity | The velocity of the rigidbody at the point Point in global space. |
| GetRelativePoint | Get a global space point given the point relativePoint in rigidBody local space. |
| GetRelativePointVelocity | The velocity of the rigidbody at the point Point in local space. |
| GetRelativeVector | Get a global space vector given the vector relativeVector in rigidBody local space. |
| GetVector | Get a local space vector given the vector vector in rigidBody global space. |
| IsAwake | Rigidbody がスリープ状態にないことを判定します |
| IsSleeping | Rigidbody がスリープ態であるか判定します |
| MovePosition | Rigidbodyオブジェクトを指定する位置へ移動します |
| MoveRotation | Rotates the rigidbody to angle. |
| Sleep | Rigidbody をスリープ状態にします |
| WakeUp | Rigidbody のスリープ状態を無効化します |
| animation | GameObjectにアタッチされたAnimation (アタッチされていない場合はnull) |
| audio | GameObjectにアタッチされたAudioSource (アタッチされていない場合はnull) |
| camera | GameObjectにアタッチされたCamera (アタッチされていない場合はnull) |
| collider | GameObjectにアタッチされたCollider (アタッチされていない場合はnull) |
| collider2D | GameObjectにアタッチされたCollider2D |
| constantForce | GameObjectにアタッチされたConstantForce (アタッチされていない場合はnull) |
| gameObject | このコンポーネントはゲームオブジェクトにアタッチされます。コンポーネントはいつもゲームオブジェクトにアタッチされています。 |
| guiText | GameObjectにアタッチされたGUIText (アタッチされていない場合はnull) |
| guiTexture | GameObjectにアタッチされたGUITexture (アタッチされていない場合はnull) |
| hingeJoint | GameObjectにアタッチされたHingeJoint (アタッチされていない場合はnull) |
| light | GameObjectにアタッチされたLight (アタッチされていない場合はnull) |
| networkView | GameObjectにアタッチされたNetworkView (アタッチされていない場合はnull) |
| particleEmitter | GameObjectにアタッチされたParticleEmitter (アタッチされていない場合はnull) |
| particleSystem | GameObjectにアタッチされたParticleSystem (アタッチされていない場合はnull) |
| renderer | GameObjectにアタッチされたRenderer (アタッチされていない場合はnull) |
| rigidbody | GameObjectにアタッチされたRigidbody (アタッチされていない場合はnull) |
| rigidbody2D | GameObjectにアタッチされたRigidbody2D |
| tag | ゲームオブジェクトのタグ |
| transform | GameObjectにアタッチされたTransform (アタッチされていない場合はnull) |
| hideFlags | オブジェクトは非表示、シーンに保存、ユーザーが編集可能などを行うかどうか |
| name | オブジェクト名 |
| BroadcastMessage | ゲームオブジェクトまたは子オブジェクトにある すべての MonoBehaviour を継承したクラスにある methodName 名のメソッドを呼び出します。 |
| CompareTag | Is this game object tagged with /tag/? |
| GetComponent | Returns the component of Type type if the game object has one attached, null if it doesn't. |
| GetComponentInChildren | Returns the component of Type type in the GameObject or any of its children using depth first search. |
| GetComponentInParent | Returns the component of Type type in the GameObject or any of its parents. |
| GetComponents | Returns all components of Type type in the GameObject. |
| GetComponentsInChildren | Returns all components of Type type in the GameObject or any of its children. |
| GetComponentsInParent | Returns all components of Type type in the GameObject or any of its parents. |
| SendMessage | Calls the method named methodName on every MonoBehaviour in this game object. |
| SendMessageUpwards | Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour. |
| GetInstanceID | Returns the instance id of the object. |
| ToString | ゲームオブジェクトの名前を返します |
| Destroy | ゲームオブジェクト、コンポーネントやアセットを削除します |
| DestroyImmediate | 直ちにオブジェクトを破壊する。ですが、Destroy関数の方を使うことを推奨します |
| DontDestroyOnLoad | 新しいシーンを読み込んでもオブジェクトが自動で破壊されないように設定します |
| FindObjectOfType | タイプから最初に見つけたアクティブのオブジェクトを返します |
| FindObjectsOfType | タイプから見つけた全てのアクティブのオブジェクト配列を返します |
| Instantiate | original のオブジェクトをクローンします |
| bool | オブジェクトが存在するかどうか |
| operator != | 二つのオブジェクトが異なるオブジェクトを参照しているか比較します |
| operator == | 二つのオブジェクトが同じオブジェクトを参照しているか比較します |