I'm busy with a little topdown shooter in XNA. Now I have a little Mathematical problem: I have a sprite, a human that's holding a 9mm. Now the sprite looks at the mouse cursor. When I shoot, I want to show a little muzzle flash @ the end of the gun barrel. However, the coordinates of the end of the barrel will change when you rotate the character.
How can I get the correct coordinates in a sprite that is the end of the barrel when for example the end of the barrel is 14px above a players head?(topdown)
So basicly I need to know how to get coordinates of a certain point in a circle that has an certain angle with the orgin.
Thanks!