1
NGUI 3 Support / Re: Follow UISpite type: Filled
« on: January 30, 2015, 11:10:57 AM »I'm not sure, but I think, you must calculate your dynamic distance (radius) based on image pixels count for current angle.
Thank you for your help.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
I'm not sure, but I think, you must calculate your dynamic distance (radius) based on image pixels count for current angle.
Hi!
You can try something like this:
public class Test : MonoBehaviour { public UISprite FilledSprite; public UISprite MarkSprite; private float _radius; void Start() { _radius = FilledSprite.width / 2f; } void Update() { var amount = 1 - FilledSprite.fillAmount; var angle = 360 * amount; var radAngle = angle * Mathf.Deg2Rad; Mathf.Sin(radAngle) * _radius, Mathf.Cos(radAngle) * _radius, 0f); } }


