Hello, how are you?
I have an issue with this code and I am stuck with it:
This is a code piece that I used to use back in the game maker days. But in unity doesn’t quite respond in the same way.
for (int i = 1; i<=360; i+=120) {
GameObject option = (GameObject)Instantiate (circular);
float xD = (Mathf.Cos (i));
float yD = (Mathf.Sin (i));
Vector3 pos = new Vector3 (transform.position.x + len * xD, transform.position.y + len * yD, 0);
option.transform.position = pos;
option.transform.parent = transform;
abec.Add (option);
}
I expected to have 3 equidistant option around my transform. But instead the 3 of them appear in the upper part.
Any help?
Thank you!