how to make it so that the rigid body object does not fall code example
Example 1: way do we use a Rigidbody in Get.component();
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; } }
Example 2: unity rigidbody
private Rigidbody rigidbody