开发者

Rotating a png image representing a unit in a game

开发者 https://www.devze.com 2023-03-11 10:36 出处:网络
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 AffineTra

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

精彩评论

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