how to rotate my flappy bird

hi im just make an smillar game like flappy bird,im confused how to rotate it im using this code but it rotate too fast

function rotatebird () local xVel, yVel = bird:getLinearVelocity() -- Matt - Calculate Angle Of Travel local birdAngle = (math.atan( yVel , xVel ) \* ( 180 / math.pi ))\*0.5 -- Rotate Bird bird.rotation = birdAngle end --Runtime:addEventListener("enterFrame", rotatebird )

You can use:

transition.to(bird, {time=200, rotation=birdAngle})

Change the time (in milliseconds) to how fast you want it to rotate.

You can use:

transition.to(bird, {time=200, rotation=birdAngle})

Change the time (in milliseconds) to how fast you want it to rotate.