How to call rigidbody 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;
//The Variable
Rigibody rb;
void Start()
{
rb = GetComponent<Rigidbody>();
}
public Rigidbody rigidbody;