Computer Science Canada Making Sprite move around in circles |
| Author: | Jisterror [ Wed Jan 31, 2007 9:25 pm ] |
| Post subject: | Making Sprite move around in circles |
I m doing this for my CS project and Im a complete noob at this.. |
|
| Author: | CodeMonkey2000 [ Wed Jan 31, 2007 10:29 pm ] |
| Post subject: | Re: Making Sprite move around in circles |
| Author: | Jisterror [ Thu Feb 01, 2007 6:55 pm ] |
| Post subject: | Re: Making Sprite move around in circles |
Thanx~~ I ll add this to my favorites! |
|
| Author: | rollerdude [ Tue Feb 20, 2007 10:08 am ] |
| Post subject: | Re: Making Sprite move around in circles |
i love making things move in circles var spritex,spritey:int var away:int:= %however far away(in pixels) you want the sprite from the %centre the circle for i:1..360 %degree of movment spritex:=round(sind(i)*away) % tells the x and y of the sprite when you call it spritey:=round(cosd(i)*away) end for note: you'll have to add a number after "away" so that the centre of the circle isn't at pixel 1,1 Sprite.Draw (spritex,spritey ....) %or whatever it is to call sprites |
|