Hi guys, I am trying to create a GUI wheel with power-ups icons and having some trouble. I researched this quite a bit, and what I want it to do is put one gui element an equidistant space from the center of a circle area (thus creating a “power wheel”). However they are appearing unevenly spaced. I checked with some Debugs and it seems like the 360 degree circle is being split evenly according to the number of elements. Can you guys take a look at the code and point probable cause out? Thanks!
Debug.Log(angle);
rad = Screen.height * .00017f;
for(int i = 0; i < powerL.Length; i++){
//Debug.Log(angle);
tweenObject *= (GameObject)Instantiate(Resources.Load("3dText"));*
tweenObject_.transform.name = powerL*;
tweenObject.transform.parent = spawnPoint.transform;
tweenObject.transform.position = new Vector3(.15f,.4f,.01f);*
float X = tweenObject.transform.position.x + rad * Mathf.Cos(angle);
float Y = tweenObject.transform.position.y + rad * Mathf.Sin(angle);_
* Vector3 finalPos = new Vector3(X,Y, 0);*
* //Vector2 finalPos = new Vector3(X,Y, 16.2785f);*
_ iTween.MoveTo(tweenObject*.gameObject,finalPos, .5f);
angle = angle + (360 / powerL.Length);
Debug.Log(angle);
}*_