A
Amazing creature
Guest
the mouse is locked in a radius in the center of the view, in windowed mode it works fine, but in fullscreen the mouse stays in one place without moving
basically what I need is that the mouse stays in the radius in fullscreen like it does in windowed mode
Code:
if instance_exists(obj_center)
{
dir = point_direction(obj_center.x, obj_center.y, mouse_x, mouse_y);
dis = clamp(point_distance(obj_center.x, obj_center.y, mouse_x, mouse_y),99,100);
tar_x = obj_center.x + lengthdir_x(dis, dir);
tar_y = obj_center.y + lengthdir_y(dis, dir);
if (m_lock)
{
window_mouse_set(tar_x - obj_center.x + obj_center.offset_x, tar_y - obj_center.y + obj_center.offset_y)
}
}
Attachments
-
99.5 KB Views: 11