Calculate distance to the point of rotating arrow

Hi,
I have a rotating arrow shape (physics), a kind of wheel of fortune I guess. I rotate the arrow by adding torque to the center point of the arrow and angular damping to slow it down.

I place several objects around the outside of the rotating arrow and can calculate the distance from each the objects to the center point of the rotating arrow with the function below.

[lua]local function distanceBetween( point1, point2 )
local xfactor = point2.x-point1.x ; local yfactor = point2.y-point1.y;
local distanceBetween = math.sqrt((xfactor*xfactor) + (yfactor*yfactor));
return distanceBetween;
end[/lua]

This works however, what I really need is not the distance to the center point of the arrow but to the point of the arrow itself.

I hope this makes sense to somebody, thanks in advance for any help :slight_smile:

[import]uid: 32170 topic_id: 15611 reply_id: 315611[/import]