Ejemplo n.º 1
0
 void Update()
 {
     if (Input.GetKey(trigger))
     {
         simulator.addForce(transform.position, Vector3.Lerp(force, force.magnitude * (Random.rotation.eulerAngles.normalized - Vector3.forward / 2 - Vector3.right / 2), 0.5f));
     }
     else
     {
         simulator.addForce(transform.position, Vector3.zero);
     }
 }