I'm working not a game, and since I couldn't find good collision detection method for detecting collision with rotated rectangles, I decided to try something like this: I have a rotated rectangle (which I suppose I can get its corners' coordinates (maybe some function of CGRect or trigonometry if necessary) I want to get all the coordinates along the line connecting two of the corners (even just the int values, or with a certain increment so it won't get too long) and get them into an array. then I can check for the containing rectangle of the ball which its bounding rectangle doesn't rotate) if it contains the any point of the array. if it does, they collided.
Is there an easy way of getting these coordinates into an array? assuming I know the start and end? I understand it will be not quite efficient, but right now I'm using the OpenGL color detection, and it is too kinda slow, and not working well, so I'm kinda in a need of a new method.
Thanks!