I am having problems moving an object in the direction of the angle that Its moving in. I can't see whats wrong with it, but the output is definitely wrong.
Here where I declare and create an object:
Here I initialize some variables:
float x, y;
int w, h;
int r, g, b;
float angle, speed;
}; typedef struct Sprite Sprite;
With an angle of 90 degrees it should move downwards, but I'm finding it moves to the left as well (as if around 110 degrees or so). Heres where I move it:
thing.r=255; thing.g=0; thing.b=0;
Can anyone see whats going wrong here?
float dx, dy;