Circular movement

BlitzMax Forums/BlitzMax Beginners Area/Circular movement

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

A very simple piece of code here -

Graphics 640,480,32,60,0


HideMouse

While Not KeyHit(key_escape)


DrawText("+",MouseX(),MouseY())

DrawText("o",MouseX()+Cos(n)*50,MouseY()+Sin(n)*50)

n:+1


Flip

Cls

Wend

End


If you want the orbit bigger/smaller, then change the 50 ((n)*50) value. If you want the "o" to go in the opposite direction, then use n:-1. If you want orbit to be faster, then increase the (n:+/-) value.

Hope that helps :)