Humm, i need some help with one thing, i have many objects in the stage, and i use the mouse to calculate the distance between a random target in this stage, using the x and y position of mouse, i can do this perfectly getting the x and y position of target object.
A use that to give me in % the distance of target object, and starting animations, between the percentage.
Today i use the Pythagorean theorem. to do that.
c = Math.sqrt(Math.pow(a, 2)+Math.pow(b, 2));
But, now i need that be influenced by the width and height of object, as they _x,_y, stay allong the object, a do a little drain to better explanation:
Someone can help me? With this? What i have to do, to getting the 0% all over the object.
Thanks, for the help!!