Hello guys,
im trying to rotate a sprite, therefore I use the command dbRotateSprite().
The Sprite should rotate while a key is pressed, but it just rotates once when I hit the key.
switch(CursorKeys()) // get the key states
{
case UP:
//move sprite up
break;
case DOWN:
//move sprite down
break;
case RIGHT:
dbRotateSprite(1, 2.0f);
break;
case LEFT:
dbRotateSprite(1, -2.0f);
break;
}
When I'm holding down the LEFT or RIGHT key, I want the sprite to rotate, but it just turns once by the specified 2°.
What am I doing wrong? Or can't dbRotateSprite() be used to do what I want?
Thanks and best wishes.
Casting, the art of manipulation; further information every day in TV.