"Swing-Effect"

Started by Chosim, Fri 17/06/2011 13:51:45

Previous topic - Next topic

Chosim

So, today i have a question-hour  :P

I want that an object swing a bit:

--------------------------------------------------------------------------------------------------
|                             Internet Spaceships is Serious Business                                    |
--------------------------------------------------------------------------------------------------

Snarky

So what is your question? How to do this?

Well, it depends on whether the object is actually a line (search the manual for DrawLine and use sin/cos to calculate the coordinates) or a sprite (search for, if I remember correctly, RotateSprite).

To get a smooth swinging motion, use a sine wave to set the angle of rotation.

SMF spam blocked by CleanTalk