Hello,
I’m trying to create a clickable angle between two lines. I’m using an image with a circular sprite and I’m radially masking out a part of it depending on the current angle.
The problem is that I can still click on the invisible part.
I can’t find out how to solve this issue. Any help would be much appreciated!
Here’s the code (probably won’t help, but just to be sure):
GameObject angleGraphic = new GameObject("angle", typeof(Image));
angleGraphic.transform.SetParent(angles, false);
var imageComponent = angleGraphic.GetComponent<Image>();
imageComponent.sprite = circleSprite;
imageComponent.color = color;
imageComponent.type = Image.Type.Filled;
imageComponent.fillMethod = Image.FillMethod.Radial360;
imageComponent.fillClockwise = false;
imageComponent.fillAmount = angle.Degrees / 360f;
In an attached script, I’m simply implementing the IPointerClickHandler interface.
Thanks in advance!