What Im trying to do is quite simple, a drag&drop type arrow that extends from the origin point to the "touch" point.
Im using two sprites for this:
A simple rectangle for the "body" of the arrow which width I'll be adapting on real time (Width = distance(Self.X, Self.Y, Touch.X, Touch.Y) ). Its center is on the left end of the sprite, and it has another image point on the right end for the next sprite.
A triangle shape for the tip of the arrow (The arrow tip uses his own sprite because I dont want the tip to get deformed with the changing of width, obviously)
The body of the arrow is pinned (position only, not angle, since the angle would be angle(Self.X, Self.Y, Touch.X, Touch.Y) ) to where I want it to origin, and the tip of the arrow is replaced at every tick at the corresponding image point with the corresponding angle.
And well, it works. The problem? When the origin of the arrow is a behavior-based moving object.
In my example, you can make the arrow appear holding left click, and it looks ok, the problem comes when at the same time you move around the origin (standard 8Direction behavior, use the cursor keys), specially if you are moving away from the arrow.
As you can see, the arrow tip gets misplaced, not by much, but enough to break the arrow shape
Am I doing something wrong? Any workaround for this?