java - Rotating Asteroids -
i'm trying make asteroids spin in 2d game.
using graphics class drawing image created onto screen (the asteroid) , moving across screen.
my next step make rotate lost @ how this.
i able make rotate when drawing polygon changing vertices of asteroid there no vertices when drawing images, (x,y) , (length,width).
how can rotate image? there inbuilt functionality it?
i'm not asking tell me how this, i'm looking push in right direction bit lost.
either use affinetransform or use graphics#rotate. in either case, should make copy of graphics context first (graphics#create) first, preserve state of original context. make sure dispose of copy when you're done (graphics#dispose)
something this perhaps
Comments
Post a Comment