Bullets only firing on X axis
Hello all, my issue is that my bullets are only firing on the x axis. Obviously I need to take the current camera angle into account, my question is how do I do that?
void CreateVectorArray (int x)
{
positions = new Vector3[x];
positions[0] = this.gameObject.transform.position;
for(int i = 1; i < x-1; i++)
{
positions[i].x = positions[i-1].x + (float)ptr[0,i] - (float)ptr[0,i-1];//yards
positions[i].y = positions[i-1].y + ((float)ptr[10,i] + (float)ptr[10,i-1])*0.0277778f;//inches
positions[i].z = positions[i-1].z + ((float)ptr[ 4,i] + (float)ptr[ 4,i-1])*0.0277778f;//inches
}
}
Comment