how to get the rigid body component of a gameobject c# unity code example
Example 1: get rigidbody component unity
//The Variable
Rigibody rb;
void Start()
{
rb = GetComponent<Rigidbody>();
}
Example 2: unity rigid body variable
public Rigidbody rigidbody;