Exemple #1
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.E) && pickup.carrying != null)
     {
         Liftable liftable = pickup.carrying;
         pickup.PutDown();
         Rigidbody rb = liftable.GetComponent <Rigidbody>();
         rb.AddForce(transform.forward * thrust, ForceMode.Impulse);
         Debug.Log("throw");
     }
 }