Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////View
- if (window_get_fullscreen()){
- var mx = 3840*(display_mouse_get_x()/display_get_width());
- var my = 2160*(display_mouse_get_y()/display_get_height());
- }else{
- var mx = mouse_x;
- var my = mouse_y;
- }
- var dire = point_direction(x,y,mx,my);
- var xTo = x + lengthdir_x(min(244,distance_to_point(mx,my)),dire);
- var yTo = clamp(y + lengthdir_y(min(244,distance_to_point(mx,my)),dire),-1000,room_height-1120);
- cx += (xTo-cx)/25;
- cy += (yTo-cy)/25;
- mat = matrix_build_lookat(cx,cy,-10,cx,cy,0,0,1,0);
- camera_set_view_mat(cam,mat);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement