SpriteFactory.Sprite.GetRigidbody
C#: RigidbodyInfo GetRigidbody (int colliderId)
JS: function GetRigidbody (colliderId : int) : RigidbodyInfo
Description
Get a specific collider's rigidbody by collider index. This function returns a
RigidbodyInfo, which is a wrapper for Rigidbody and Rigidbody2D. This allows you to retrieve either type of rigidbody.
Returns null if passed an invalid index.
C#: RigidbodyInfo GetRigidbody (string colliderName)
JS: function GetRigidbody (colliderName : String) : RigidbodyInfo
Description
Get a specific collider's rigidbody by collider name. This function returns a
RigidbodyInfo, which is a wrapper for Rigidbody and Rigidbody2D. This allows you to retrieve either type of rigidbody.
Returns null if passed an invalid name.