This is how u do it ,if I understand u correctly
GameObject instance = Instantiate(thePrefab,transform.position,Quaternion.identity)as GameObject;
instance.rigidbody.AddForce(transform.right*50);
Destroy (instance.gameObject,0.5f);
U can play with transform.right and the number 50 that is the shooting force
Decrease the number for less force and increase to shoot faster.please vote me if u can
↧