the ball should be shot from one position, not two here is the code:
public var snowballPrefab : Transform;
public var snowballSpeed : float = 6000;
function Update(){
if(Input.GetButton("Fire1"))
{
if(!snowballPrefab || !snowballSpeed)
{
Debug.Log("[Shoot] 'bulletPrefab' or 'bulletSpeed' is undefined");
}else{
var snowballCreate = Instantiate(snowballPrefab, GameObject.Find("SSpawnPoint").transform.position, Quaternion.identity);
snowballCreate.rigidbody.AddForce(transform.forward * snowballSpeed);
}
}
}
It's acting very wierd. I use a Object as Spawn Point, One prefab as bullet, and everything is set up properly, but there are 2 bullets from two points shot instead of from a point.