C
CanRuf
Guest
Hello!
I am using the new camera system in GMS2 and i couldn't figure out how to pan the camera using the mouse.
I want the same or similar panning to the GMS2 Workspace, where you hold down mb_middle and move the mouse to pan the view.
My camera objects create event code:
Thanks in advance.
I am using the new camera system in GMS2 and i couldn't figure out how to pan the camera using the mouse.
I want the same or similar panning to the GMS2 Workspace, where you hold down mb_middle and move the mouse to pan the view.
My camera objects create event code:
Code:
camera = camera_create();
var viewmat = matrix_build_lookat(x,y,-100,x,y,0,0,1,0);
var projmat = matrix_build_projection_ortho(320,240,1.0,32000.0);
camera_set_view_mat(camera,viewmat);
camera_set_proj_mat(camera,projmat);
view_camera[0] = camera;