Looping image at an angle

BlitzMax Forums/BlitzMax Beginners Area/Looping image at an angle

Hezkore(Posted 2011) [#1]
Ok basically what I want to do is loop an image.
Like this:


BUT!
I want to do it at random angles, so it has to work at 45 degrees, 15 degrees etc.
Like so:


And I'm not talking about SetRotation(45) here, the image is only 32x32 pixels and looped.

Any code example is welcome!

Last edited 2011


Polan(Posted 2011) [#2]
you mean this?
Graphics 800,600
Global rot:Float = 0

While Not KeyHit(key_escape)
Cls
rot :+ 1
SetRotation rot
For x = -10 To 10
DrawRect 400-x*10*Cos(rot),300-x*10*Sin(rot),10,10
Next

Flip
Wend



Hezkore(Posted 2011) [#3]
Yeah that'll probably do it.
Thanks for the code and quick response mate! :)