Re: [AD] rotate direction

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


> The only thing al_draw_rotated_* can do is either rotated
> clockwise with
> a positive paramter or with a negative one - I wouldn't
> know of any
> reason myself to prefer one over the other though. Any math
> people know
> if this is somehow specified?

If you have a sprite that is a turret, the al_draw_rotated_* has to match the expected rotation direction given the output from atan2 if you want to use that angle without negating it first, and have the turret point in the right direction. Personally, I'd prefer for the increasing parameter to result in a clockwise rotation: since Allegro has it's y axis pointing down, the rotation sense has to be reversed for the definitions of sin and tan to still apply. I wouldn't like negative signs to start popping up everywhere because the geometry is inconsistent. Surely there are no suggestions that for the increasing y parameter in various bitmap routines the sprite should move up as well?

Either way, though, it should be consistent for all angle-using functions in Allegro and mentioned in the docs.

-SiegeLord

> 
> -- 
> Elias Pschernig <elias@xxxxxxxxxx>



      




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