how to access rigidbody in unity code example
Example 1: get rigidbody component unity
//The Variable
Rigibody rb;
void Start()
{
rb = GetComponent<Rigidbody>();
}
Example 2: unity rigidbody
private Rigidbody rigidbody
//The Variable
Rigibody rb;
void Start()
{
rb = GetComponent<Rigidbody>();
}
private Rigidbody rigidbody