Hello, I want to ask how do i shoot the balloon?
Like for example from the image, when the player click on the balloon, the cannon will shoot a fireball/arrow to the balloon and destroy the balloon. I am thinking to use and edit the codes that i have learnt from tornado twin.
var LookAtTarget : Transform;
var damp =6.0;
var bulletPrefab : Transform;
var savedTime =0;
function Update ()
{
if(LookAtTarget)
{
var rotate = Quaternion.LookRotation(LookAtTarget.position - transform.position);
transform.rotation = Quaternion.Slerp(transform.rotation, rotate , Time.deltaTime * damp);
var seconds : int = Time.time;
var oddeven = (seconds % 2);
if(oddeven)
{
Shoot(seconds);
}
}
//transform.LookAt(LookAtTarget);
}
function Shoot(seconds)
{
if(seconds != savedTime)
{
var bullet = Instantiate (bulletPrefab, transform.Find("spawnPoint").transform.position , Quaternion.identity);
bullet.gameObject.tag = "enemyProjectile";
bullet.rigidbody.AddForce(transform.forward*1000);
savedTime = seconds;
}
}

I would appreciate if anyone could lend a helping hand on how i can do it?