jonjons
Member
hello
Is there a formula do to this ?
i have this surface with its offset:
iam using it on the object origin x and y to replace the sprite.
problem is the image scale... If i set the scale to 0.5, 0.5.
i need to devide the AnimXoffset /2 and the AnimYoffset /2 ( to keep it on the object center origin )
but i cant do this ....
is there a formula to tweak the costum AnimXoffset and the AnimYoffset based on the image scale ?
Is there a formula do to this ?
i have this surface with its offset:
GML:
surfAnim = surface_create(180, 140);
AnimXoffset = 88;
AnimYoffset = 128;
Code:
draw_surface_ext(surfAnim, x - AnimXoffset , y - AnimYoffset...... ...
i need to devide the AnimXoffset /2 and the AnimYoffset /2 ( to keep it on the object center origin )
but i cant do this ....
GML:
surfAnim = surface_create(180, 140);
AnimXoffset = 88/image_xscale;
AnimYoffset = 128/image_yscale;