This site requires JavaScript, please enable it in your browser!
Greenfoot back
MysteryMudokon
MysteryMudokon wrote ...

2017/4/19

Is there any way to keep image angle consistent?

MysteryMudokon MysteryMudokon

2017/4/19

#
I'm currently attempting to remake pong and I've hit a bit of a snag. The ball rotates when it turns. Is there a way to keep the image level while changing the movement angle?
danpost danpost

2017/4/19

#
MysteryMudokon wrote...
I'm currently attempting to remake pong and I've hit a bit of a snag. The ball rotates when it turns. Is there a way to keep the image level while changing the movement angle?
// add instance field
private int rotation;

// as first line in act method
setRotation(rotation);

// as last lines in act method
rotation = getRotation();
setRotation(0);
MysteryMudokon MysteryMudokon

2017/4/26

#
Sorry for the delayed response. but thank you!
You need to login to post a reply.