1
\$\begingroup\$

I want the rotation of the sprite. So that I used RotationModifier, but in that I have to specify the time interval you want the rotation. But I want to create rotation which was infinite. So please help me.

\$\endgroup\$
5
\$\begingroup\$

LoopEntityModifier is the way to go!

Not sure, but it may end as something like this:

LoopEntityModifier EntityModifier =
                   new LoopEntityModifier( new RotationModifier(yourargs) );
\$\endgroup\$
5
\$\begingroup\$

What about (pseudo-code):

update(float dt){
    sprite.rotation += degreesPerSecond * dt;
}
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.