Alright, I'm making a 2D tank game for my final project in programming in a Java applet. The tanks each have a polygon object which represents their bounding box, and I can check when the bounding boxes collide. So, I need to find the 4 vertices of a rectangle when I know it's centre, width, height, and angle of rotation. The angle is the same as the cartesian plane, 0 is facing right. I can get it to work if it's a square, but my algorithm falls apart if I apply it to a rectangle. Does anybody know/can easily develop a formula for finding the vertices? Thanks.
------------------
BV's rendition of Titanic: Let's have sex. I won't let go. I don't need this stone.
The End.
~ Wolfy
------------------
BV's rendition of Titanic: Let's have sex. I won't let go. I don't need this stone.
The End.
~ Wolfy
That painting was a gift, Todd. I'm taking it with me.