how to reference rigidbody in 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;
Example 3: unity rigidbody
private Rigidbody rigidbody