No one will tell you how to make the image rotate on java? Wanted to use
canvas.save(); canvas.rotate(angle); canvas.drawBitmap(player, x, y, null); canvas.restore(); but somehow it doesn’t react so well. I need the image to rotate constantly.
UPDATE:
Found a working example
class Car { final Matrix transform = new Matrix(); final Bitmap image; Car(Bitmap sprite) { image = sprite; // Created by BitmapFactory.decodeResource in SurfaceView } void update() { this.transform.preRotate(turnDegrees, width, height); } void display(Canvas canvas) { canvas.drawBitmap(this.image, this.transform, null); } } but it turns very dumb, not around its axis, but around the axis of the devil knows what)