Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top