nobody
nobody

Reputation: 161

Pygame.transform.rotate error

I am attempting to scale a surface in pygame but I am getting this error:

pygame.transform.scale(sprite.getSurface(), math.radians(sprite.getFaceAngle()))
TypeError: must be 2-item sequence, not float

My code is as follows:

pygame.transform.scale(sprite.getSurface(), math.radians(sprite.getFaceAngle()))

Upvotes: 0

Views: 616

Answers (1)

rkulla
rkulla

Reputation: 2524

The error is pretty self-explanatory. http://www.pygame.org/docs/ref/transform.html#pygame.transform.scale says the second argument should be (width, height). math.radians() only returns a float.

Upvotes: 1

Related Questions