Kordinate Calculation with trigonometri
Hello!I really suck at trigonometri.
So I hope that I could get some help to calculate some cordinates for a little Java-Game that I'm trying to write.
I got a little tank that moves around, but now I need some collision detection so my plan is to keep track of the corner cordinates. But I do not know how to calculate it, cause the tank is twisting.
I got 2 image that illustrates the scenario, the pixle at the corner inside the red circle is the one that I would like to keep track of:
http://medlem.spray.se/fredand44/1.gif
http://medlem.spray.se/fredand44/2.gif
The data that is known is:
gameWindowWidth
gameWindowHeight
tankWidth
tankHeight
gameWindowCenter
tankTwistingAngle
So if any one could give me a formula to calculate the shifting values for that cordinate, that is dynamic I would be most grateful.
Best regards
Fredrik
