开发者

Rotating a png image representing a unit in a game

I am using png's in my tower defense game. How would I rotate a picture so it follows the movement of another picture (lik开发者_如何学Ce a turret always pointing at a target)?


Look into the AffineTransform class. The rotate method is what you're looking for. Here's an example!

If you've got some other specific game-development-related questions, there's a Game Development StackExchange site too.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜