Page 1 of 1

Rotation Questions

PostPosted: Mon Jul 16, 2012 4:59 pm
by Hblade
I want to have a ship sway left and right as its coming down the screen, (its an arcade shooter type game), heres the sprite.. How can I make it sway left and right but not go up and down? as well as change the animpos to the position required?
enemy1.png


Second question, with a resolution of 480 x 480, how can I have the ship rotate around the edges of the screen? After the ship comes in and is on screen fully, I want it to rotate around the screen.

(There are 2 different enemy types, I'll use RGB to change color). the first type sways left and right while the second type rotates

Re: Rotation Questions

PostPosted: Mon Jul 16, 2012 7:56 pm
by skydereign
Hblade wrote:I want to have a ship sway left and right as its coming down the screen, (its an arcade shooter type game), heres the sprite.. How can I make it sway left and right but not go up and down? as well as change the animpos to the position required?

Do you just mean move back and forth on the screen? If so then rotation has nothing to do its movement. Just use normal rotation code, and normal movement code.
Hblade wrote:
enemy1.png

I've mentioned before that the rotation shouldn't start facing up. It really is simpler to have them facing right and rotation counterclockwise. That is the way angles are done.

Hblade wrote:Second question, with a resolution of 480 x 480, how can I have the ship rotate around the edges of the screen? After the ship comes in and is on screen fully, I want it to rotate around the screen.

(There are 2 different enemy types, I'll use RGB to change color). the first type sways left and right while the second type rotates

By rotate do you mean in an actual circle? If that is the case just use similar code that I showed you for the fire ball. Otherwise you'll have to explain a bit more.

Re: Rotation Questions

PostPosted: Mon Jul 16, 2012 11:16 pm
by Hblade
Thanks sky