- Home /
make a ball hit a target
There is a ball and a target on a floor. The ball is apart from the target. I'd like to make the ball hit the target flying in arc.
direction = GameObject.Find("hole").transform.position - rigidbody.transform.position;
rigidbody.AddForceAtPosition(direction*10, transform.TransformPoint (new Vector3 (0, 0, 0)) );
Is this script close? how can you make the ball fly in arc.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612165056im_/https://answers.unity.com/themes/thub/images/avi.jpg)