Complete the code to add a Rigidbody component to the GameObject.
gameObject.AddComponent<[1]>();The Rigidbody component is added to enable physics on the GameObject.
Complete the code to set the Rigidbody's mass to 5.
Rigidbody rb = GetComponent<Rigidbody>(); rb.[1] = 5f;
The mass property sets how heavy the Rigidbody is.
Fix the error in the code to apply a force to the Rigidbody.
Rigidbody rb = GetComponent<Rigidbody>();
rb.AddForce([1]);The AddForce method requires a Vector3 for 3D forces.
Fill both blanks to create a Rigidbody and set it to use gravity.
Rigidbody rb = gameObject.AddComponent<[1]>(); rb.[2] = true;
First, add a Rigidbody component, then enable useGravity to let it fall.
Fill all three blanks to apply an upward force only if the Rigidbody's velocity is less than 5.
Rigidbody rb = GetComponent<[1]>(); if (rb.velocity.magnitude [2] 5) { rb.AddForce([3]); }
Get the Rigidbody component, check if speed is less than 5, then add upward force.
