Пример #1
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Space) && !gameManager.activeBall)
     {
         float   _thrust    = aimingObject.transform.localPosition.z / 3;
         Vector3 _direction = aimingObject.transform.position - transform.position;
         football.AddImpulse(_direction, _thrust);
     }
 }