The code i use for figuring out the click and drag, this works fine if i make horizontal, and vertical x, and z. But as soon as the camera direction changes it goes diagonal not left.
End_Step
if(mouse_check_button_pressed(mb_left))
{
//X , Y Start
xs = window_mouse_get_x()*.4;
ys = window_mouse_get_y()*.4;
}
if(mouse_check_button(mb_left))
{
//X , Y End
xe= window_mouse_get_x()*.4;
ye= window_mouse_get_y()*.4;
//Translate Camera
[i]horizontal[/i] -= xs-xe;
[i]vertical[/i] -= ys-ye;
//Reset
xs = xe;
ys = ye;
}I don't know if this is of use but this is my code for drawing.
Draw_Event
// SET CAMERA PROJECTION // FROM CAMERA X,Y,Z xf=x+lengthdir_x(cam_dis,cam_dir); yf=y+lengthdir_y(cam_dis,cam_dir); zf=cam_zdir // TO PLAYER X,Y,Z xt=x; yt=y; zt=z; d3d_set_projection(xf,yf,zf, xt,yt,zt, 0,0,1); // SET COLOR AND TRANSPARENCY draw_set_alpha(1); draw_set_color(c_white);
If i am not being clear please let me know i will just post an example to show you exactly whats wrong.











