_Greetings
Greetings. I am working on c# script for a ‘bullet-hell’ tool and I have gotten stuck trying to produce a crescent / half-circle of objects - that turns toward the traveling direction. The scripts spawn a perfect half-circle every time and keep them there, no matter object-amount. No problem there.
_Question
What I am trying to achieve is for the half-circle to point towards the travel-direction of the centerObject. This travel direction is described via a Vector2 between (1,1) and (-1,-1). How can I use this vector to turn the half-circle in the direction of travel?

There are multiple instances of InitializeOrbit, each responsible for its own half-circle and with a corresponding move direction Vector2.
_Code
In the first script, the ‘theta’ is first calculated, whereafter the objects are spawned.
public void InitializeOrbit()
{
for (int i = 0; i < numberOfOrbits; i++)
{
float theta = (1 * Mathf.PI / numberOfOrbits) * i;
Instantiate(OrbitPrefab, orbitLocation, transform.rotation);
}
}
And in the second, the theta is used to calculate the position of the individual objects.
public void OrbitSource ()
{
Vector2 offset = new Vector2(Mathf.Sin(theta) * orbitRadius, Mathf.Cos(theta) * orbitRadius);
transform.position = (Vector2)centerTransform.position + offset;
}
I hope I have provided proper information, thanks in advance.