Rotation

BlitzPlus Forums/BlitzPlus Beginners Area/Rotation

Still doing the same thing (see forum posting before this one). I want the ship to always be facing the cursor, but I know that's a problem since the RotateImage command does not run in real-time. Is there any solution here?

You need to rotate all of your images ahead of time and store them in an array. Then you just index the array with the angle you want it to be at.

I made some code for a similar topic, here:
http://www.blitzbasic.com/Community/posts.php?topic=82064#925355

Or rotate the images outside of your game and store them in in animated image (see the loadanimimage command for instance). That way you simply use the frame argument when drawing your image.