0

I'm planning to make a game and doing some research. One of the features will be an isometric third-person view, which should be able to be rotated freely over 360 degrees. This rules out the use of a simple tileset, because I cannot rotate tiles. I therefore want to transform a texture and draw it on the screen that way, preferably even multiple textures (sides of a block). However, I could not find anything to help me with this.

TL;DR How do I transform textures the way I need to to form isometric tiles which can rotate a full 360 degrees? I also need some kind of formula that stays correct even if I turn less or more than 90 degrees.

gamesaucer
  • 113
  • 1
  • 10

1 Answers1

0

Use Graphics2D -- you can cast most Graphics references to Graphics2D, and use this more powerful API.

In particular you have the rotate() and transform() methods.

See: http://docs.oracle.com/javase/6/docs/api/java/awt/Graphics2D.html

Thomas W
  • 13,940
  • 4
  • 58
  • 76
  • This does seem to be what I need. Do you use this more often? Because I've been looking at it and I wonder whether `public abstract boolean drawImage(Image img, AffineTransform xform, ImageObserver obs)` is the function I need. If so, it is not very clear what the Observer is notified of and what it should do, if anything. – gamesaucer May 11 '13 at 15:55