Akira
0
Q:

get rigidbody component unity

//The Variable
Rigibody rb;

void Start()
{
	rb = GetComponent<Rigidbody>();
}
1
 using UnityEngine; using System.Collections;  public class Test : MonoBehaviour {     private Rigidbody rb;     void Awake(){          rb = gameObject.GetComponent<Rigidbody>();     }       private void Example() {         rb.velocity = some value;     } }
1
public Rigidbody rigidbody;
1

New to Communities?

Join the community