Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Sprite Rotate

Author
Message
Bozzy
18
Years of Service
User Offline
Joined: 10th Sep 2006
Location: Birmingham, UK
Posted: 19th Oct 2006 20:24
Hi, ive got this code:



but the sprite only rotates by 2 and then when i keep on holding down left it stays the same angle (which is the original -2) can anyone help?
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 19th Oct 2006 21:36
"Rotate sprite" uses a number between 0 and 359. All you need is a variable to store the sprites current rotation. You can use numbers beyond that range and it automatically figures out what the angle is... but it's probably best to limit the range in code.

Login to post a reply

Server time is: 2025-05-15 14:27:19
Your offset time is: 2025-05-15 14:27:19