its a 3d person game like mario 64 so i want the player to walk in the direction i move the joystick no matter the camera angle. this is the code:
VECTOR temp;
distance = 200;
angle =0;
while(me)
{
if(player)
{
camera.x = player.x-distance*cos(angle);
camera.y = player.y-distance*sin(angle);
camera.z = player.z+20;
vec_set(temp,player.x);
vec_sub(temp,camera.x);
vec_to_angle(camera.pan,temp);
angle -= (joy_5-joy_6)*4*time_step;
angle %= 360;