- Home /
Question by
ROOKIE · Jul 12, 2011 at 11:41 PM ·
bulletturretcannonball
How to make Cannon ball fly in arc
I have Turret that should catapult ball in arc but instead it shoots it straight towards me. Any help is greatly appreciated.
Comment
Best Answer
Answer by aldonaletto · Jul 13, 2011 at 02:42 AM
You should enable bullit3 gravity (if it was disabled in the prefab). And moving the bullet by setting the velocity is easier (AddForce will depend on the bullet mass):
...
bullit3.gameObject.tag = "enemyProjectile";
bullit3.rigidbody.useGravity = true; // enable gravity
bullit3.rigidbody.velocity = transform.forward * 50; // define bullet velocity
...
Answer by Dan the Man · Jul 12, 2011 at 11:48 PM
If you have gravity set to a decent amount and the cannon ball is a rigidbody, it should automatically do that.
Your answer
![](https://koobas.hobune.stream/wayback/20220612142207im_/https://answers.unity.com/themes/thub/images/avi.jpg)