JeanSwamp
Member
Hello,
I have a very simple drag system for my camera, with a setup as such:
Create:
Drag Start:
Dragging:
Step:
The camera while dragging after the first movement feels fine. The problem is the first drag gesture will make a massive jump, the further away you're from the 0. I have no idea what is causing this initial jump on drag and I can't seem to figure out a way to fix it. Anyone notice anything? Because I think everything is correct.
Also, ignore the
I have a very simple drag system for my camera, with a setup as such:
Create:
GML:
position_x = 0;
position_y = 0;
new_room_x = 0;
new_room_y = 0;
GML:
position_x = event_data[? "posX"];
position_y = event_data[? "posY"];
GML:
new_room_x = position_x - event_data[? "rawposX"];
new_room_y = position_y - event_data[? "rawposY"];
GML:
new_room_x = clamp(new_room_x, 0, room_width-cam_w);
camera_set_view_pos(view_camera[0], new_room_x, cam_y);
Also, ignore the
Y
values as I don't move them. This all happens to X
values