Rotation Questions

Non-platform specific questions.

Rotation Questions

Postby Hblade » Mon Jul 16, 2012 4:59 pm

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
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Rotation Questions

Postby skydereign » Mon Jul 16, 2012 7:56 pm

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Rotation Questions

Postby Hblade » Mon Jul 16, 2012 11:16 pm

Thanks sky
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron