i am working in a game like Geometry dash on java , i got all of the mechanics like , wave , ball , ufo , ship.... anyway i am trying to achieve the effect of the square rotating when it jumps like the original game y try to do this using affineTransform but it doesnt work like the original game i use this code to rotate , but looks weird
public void rotate(){
tx.rotate(Math.toDegrees(degrees),width/2,width/2);
op = new AffineTransformOp(tx, AffineTransformOp.TYPE_BILINEAR);
}
here is a capture of my game looking right now
got any ideas? please help me :c