GMS 2 Sprite offset not working for the sprite preview on cursor

mikix

Member
I want to move the surface to a better place so that it's easier to rotate the canvas and see all of it much easier. But something that I love so much is that I can preview the sprite on my cursor and lay it down exactly on the same spot like where it is previewed.


DRAW
GML:
   sprite_set_offset(sprite_index, 480, 270);

draw_surface_ext(final_surf,480,270,1,1,0,c_white,1)


draw_rectangle(480,270,surface_get_width(final_surf) + 480,surface_get_height(final_surf) + 270,true)
DRAW GUI
GML:
draw_sprite_general(sprite_index,-1,0,0,sprite_width,sprite_height,device_mouse_x_to_gui(0),device_mouse_y_to_gui(0),global.scax * global.zoom,global.scay * global.zoom,global.ang,color,color,color,color,0.4)
 
Top