Thanks guys!
this is what i got for a direction to x y, it works perfectly!
float directionTo(int x1, int y1, int x2, int y2)
{
//take in variables
float calc1 = x1 - x2;
float calc2 = y1 - y2;
//returns direction in radians, so we have to convert it to degrees, and then offset by -90 degrees
return ((atan2(-calc1, -calc2))/3.14159265 * 180)-90;
}
And here's the promised top down sprite sheet:
http://tinypic.com/r/25a7ujt/3Also, i know almost everything about sprites and object oriented programming, i got a headstart by using gamemaker for about a year, then i quit and started to learn c++
I'm doing a remake of my old game maker game
its a fun top down shooter with pretty graphics and your choice of enemies and weapons