This might be a general math question, so excuse me if it doesn't belong here.
I have an airplane that flies around the screen. Pressing the W key will make it counterclockwise, and pressing the S key will make it rotate clockwise. When I press space, it shoots bullets. However, as it stands, the bullets begin at the top left corner of the image.
My question is, how do I find a coordinate point (specifically, x33 y10) on the image (so if the image was at x400 y300, the point would be x433 y310), regardless of the rotation?
If that wasn't very clear, consider this image: https://dl.dropbox.com/u/56274235/planeexample.png (Blown up for convenience.)
I want to find the green dot, regardless of the facing of the plane. How do I do that?

3
Contributors
3
Replies
4
Views
4 Years
Discussion Span
Last Post by Chuckleluck

Do you know the value of the current rotation angle of the image when space is being pressed? If you could obtain such value, you can simply compute the point by doing the point rotation using the center of the image as the origin point.

Edited by Taywin

Ah yes those transform() methods work great. Thanks!