Re: [AD] rotate direction

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Trent Gamblin wrote:
Writing some code for my game I came to realize that the C trig
function sin behaves differently than the al_draw_rotated_*
functions. "sin" starts at 0 (3 o'clock) and moves clockwise so that
pi/2 is at 6 o'clock. The allegro functions however go counter
clockwise, starting at the same 0 with pi/2 at 12 o'clock.
Just to be clear, the reason for this is that sin(pi/2) is and if you assume pi/2 is "up" and the top of the screen is y=0 then you really want to move in the negative direction.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/