unity addforce rigidbody 3d code example
Example 1: unity rigidbody addforce
rb = GetComponent<Rigidbody>();
rb.AddForce(new Vector3(1.5f,1.5f,1.5f));
Example 2: rb.addforce 3d c#
rb.AddForce(0, 0, 5 * time.deltaTime);
// time.deltaTime is optional