I have a ship object that I want to be able to rotate towards any certain point I click on the screen (See pic of ship and sqaures as points). I can get the ship to face the general direction, but it has this strange behavior of as it rotates the ship itself; the image moves around an circular axis, instead of rotating from the center point of the image itself.
Can someone please, give me the formula to get the angle from the center xy point of image to the destination sqaure(mouse click)?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…