objects direction calculation

Started by
9 comments, last by Craazer 21 years, 6 months ago
Thank you for help, i think i got it work now.

conclusion:

  double radiant = atan2(( (des_y - y) / (des_x - x) ));int direction = (radiant * 180 / PI);//this gives 180 - -180// so i just make 360 from thoes values// just bad that the ''north''(0) is right   

This topic is closed to new replies.

Advertisement