hello all
i am going to develop an 3d game where i want to fire bullets by gun
i have searched for fire and also using a simple code for firing the bullet
following code is working but i dont know how to create spawnPoint
var BulletPrefab :Transform;
var force : float = 2;
function Update()
{
if(Input.GetButtonDown("Fire1"))
{ var bullet = Instantiate(BulletPrefab,GameObject.Find("spawnPoint").transform.position,Quaternion.identity);
bullet.rigidbody.AddForce(transform.forward * force);
} }