Hi, I currently use g.rotate to rotate the main player (currently a square), my problem is that g.rotate rotates everything drawn.
For example: g.rotate(myCharector.getRoation(mouseX, mouseY),
(int) myCharector.getXCoordinate() + 10,
(int) myCharector.getYCoordinate() + 10); //Rotation works as intended
g.fillRect((int) myCharector.getXCoordinate(),
(int) myCharector.getYCoordinate(), 20, 20);
if (characterMenu == true) {
//draws a characterMenu
}
I want the characterMenu to be drawn above the character but I don’t want the characterMenu to be rotated along with the square. To fix the problem I had to call g.rotate with the opposite value so the rotation would cancel out. I feel as if this isn’t the most efficient way of handling the problem though. Does anyone have any suggestions?
Thanks in advance for any help you provide, I really appreciate it!