By default, your GUI size will be the size of your view port.
If your view width is only 400,300, mouse_x and mouse_y when the mouse is in the bottom right, in the Draw Event will be bottom right corner of the screen, but if you use mouse_x and mouse_y in the GUI layer, it will draw in the middle of the screen.
So what code are you using to draw the effects on the GUI layer, are you using mouse_x and mouse_y , or are you converting it to match the GUI layer size, please post your code.
I'm posting a plain image on the gui layer for accuracy.
The trail effect is it's own object that's being created every so many steps on a normal draw layer, not the gui layer.
Here's the general nonsense for the draw GUI event:
[The long if statements are basically if the player is a certain character]
Code:
var mx=device_mouse_x_to_gui(0);
var my=device_mouse_y_to_gui(0);
if !global.pause&&!global.cutscene&&!controller.ded&&controller.start{
if (global.in!=obj_vis_ketsu)||(instance_exists(obj_vis_ketsu)&&!obj_vis_ketsu.ar){
if (!global.gp)&&!((global.in=obj_vis_sal||global.in=obj_vis_maav||global.in=obj_vis_levi||global.in=obj_vis_vendor||global.in=obj_vis_manager)&&global.in.bulcharge){
if alarm[0]=-1
alarm[0]=1*delta;
draw_sprite(ms,0,mx,my);
image_index=0;
image_speed=0;
}
if (global.in=obj_vis_sal||global.in=obj_vis_maav||global.in=obj_vis_levi||global.in=obj_vis_vendor||global.in=obj_vis_manager)&&global.in.bulcharge{
draw_sprite(ms,image_index,mx,my);
image_speed=0.5/delta;
}
}
}
if global.cutscene&&!global.gp||(!controller.title&&!controller.start)||controller.ded
draw_sprite(spr_mencur,0,mx,my);
This part works as expected. It's the trail effect where things get weird.
The alarm 0 event is where the effect is being created (not the most efficient I know, but it works for now).
Code:
instance_create(obj_player.xx,obj_player.yy,mouse_fx);
obj_player.xx/yy is basically just a pass through of either the gamepad coordinates (which work normally btw) or mouse_x/y depending on which input has been detected last.
So basically:
Code:
if (!global.gp){
...
xx=mouse_x;
yy=mouse_y;
...
}
EDIT: It seems I've found the exact numbers in which the mouse position is off by. Exactly half the display gui (display_get_gui_width/height).
After a little bit of digging, I found that I set the gui size like so:
Code:
display_set_gui_size(__view_get( e__VW.WView, 0 ),__view_get( e__VW.HView, 0 ));
The weird thing is, those would return 400 and 300 respective, syncing up the GUI with the size of everything drawn on screen. Removing the above line sort of fixes the problem, but then everything drawn on the GUI (which is a fair bit) is half the size.
I guess I can live with simply manually modifying the mouse coordinates, but the fact that this affects the mouse position at all is very odd to me. There's also the fact that this may not be consistent across devices with different resolutions.