Part of the problem is that I need to apply velocity to both the X and Y axis for just a single direction of movement.



my_speed.x = 25 * (key_cuu - key_cud) * cos(camera.pan);
my_speed.y = 25 * (key_cuu - key_cud) * sin(camera.pan);


This works for forwards and backwards, but how do I then factor in lateral movment (left & right)? Basic sin/cos calculations are for a single vector of force along an angle. Adding in a second vector makes my brain hurt.

perhaps...

my_speed.x = (key_cuu - key_cud) * cos(camera.pan);
my_speed.y = (key_cuu - key_cud) * sin(camera.pan);
my_speed.x += (key_cul - key_cur) * sin(camera.pan);
my_speed.y += (key_cul - key_cur) * cos(camera.pan);
my_speed.x *= 25;
my_speed.y *= 25"

Or somthing to that effect?