I"m trying to shoot projectiles from two guns next to each other into a common point. I show where I'm going to shoot with the code below, which calculates the vector to shoot towards. The shots do go along the vector indicated on the screen, but I'm expecting the rays from the guns to meet at the point "to". They are not, and seem to run paralell to each other based on their spacing.
How do I get them to intersect at that common point?
private Vector3 calculateToVector(Projectile proj)
{
Vector3 rootPos = transform.root.position;
string rootName = transform.root.gameObject.name;
Ray ray = new Ray(rootPos, transform.root.forward);
Vector3 to = ray.direction * (proj.range + 2);
Debug.DrawRay(rootPos, to, Color.green);
Debug.DrawRay(transform.position, to, Color.blue);
return to;
}