Linking a GIF to show the error b/c pictures speak volumes. GIF link
The Sprite is supposed to follow the Cursor. It does this to a decent degree but after leaving the center of the screen the Sprite starts moving off the cursor.
I was doing some testing with Sprites as UI Elements for a Radial menu.
The Sprite object consist of:
Parent Sprite:
–Child Sprite (per section of the Radial)
The Parent Sprite has a Rect Transform.
The code I am using to move the Sprite around is:
//myCan is a reference to the Canvas
RectTransformUtility.ScreenPointToLocalPointInRectangle(myCan.transform as RectTransform, Input.mousePosition, myCan.worldCamera, out pos);
pos *= Time.deltaTime;
myGO.GetComponent().position = pos;
Can anyone tell me what I may be doing wrong?