wait wait wait i think i was wrong from the beginning
the polygon center is not relevant
what i need is only the angle between the first point and second point and then i will add that angle to the polygon rotation
so the real center is also the first point because if i touch the screen and get the first point and store it as a variable
then moving on the x axis start creating the second point on every move but if i stay on the y axis and just move on the x axis the polygon should not rotate
if the center of both vectors would be the center of the polygon then moving on the x axis would rotate the polygon because an angle was created and thats wrong
see pic:
the polygon should not rotate in such action so the center cannot be the polygon center
actually in need this formula for my new game (
Power Blocks) and now i rotate the polygon by just moving right/left and adding the difference between x1 to x2
but i would like to give a better filling of rotating the polygon by making a circular movement on the screen and like this rotate the polygon would be more realistic then it is now
i guess this task would be to complicated to do...