C
C#5mo ago
Epiceratos

How to connect Rigid body with Reference?

No description
No description
3 Replies
Epiceratos
EpiceratosOP5mo ago
Im just around one week anyway
sibber
sibber5mo ago
youre looking for GerComponent and you might want to require that componenet
Salman
Salman5mo ago
you should make the variable private :
private Rigidbody2D rb;
private Rigidbody2D rb;
Then add the Rigidbody2D component manually from the inspector and then reference it in the Start method like this :
rb = GetComponent<Rigidbody2d>();
rb = GetComponent<Rigidbody2d>();

Did you find this page helpful?