Hi!
I am developing a 2D game in Java where top-left corner is (0,0) and bottom-right is (max x, max y).
I want to render rotated rectangles next to each other. Say I have the following image(rotation 0):
If I wanted to draw an other one of this next to this one so that the green line connects(or "chains"), I would simply draw it at previous rectangle position + rectangle with. Easy.
If it however was rotated, like this(30 degrees):
Then I would somehow have to recalculate both the x and y coordinate. Not sure how to do this.
Any help would be appropriated.
↧