Ejemplo n.º 1
0
    // Pushes the ball in the direction of the ray from the camera to the ball's position
    public void PushBall(float forcePower = 20)
    {
        Debug.Log("Pushing Ball");
        var rigidbody = getRigidBody();

        var ray = ballControl.GetRayCameraToBall();

        rigidbody.AddForce(forcePower * (ray.direction));
    }