H
Harper
Guest
I am so confused... When I use draw_sprite_general it draws my sprite up and to the right by half the sprite width and height. I assume it's because GMS2 thinks the sprite origin is elsewhere, but I can't figure it out.
DRAW:
If I use any other draw function, it slaps the sprite on top of the original like it's supposed to, but I need to use a function that alters the angle it's drawn and the part of the sprite that is drawn. The variable distance starts at the value 0 in the create code, and doesn't change until I hit the assigned key, so it's not the problem.
I tried using lengthdir functions but I have no way of getting the angle that I need because I'm drawing a sprite not creating an instance...
DRAW:
Code:
draw_self();
get_controls();
if(key_test) distance--;
draw_sprite_general(sprite_index, 0, distance, 0, sprite_width, sprite_height, x, y, 1, 1, image_angle, c_white, c_white, c_white, c_white, 1);
I tried using lengthdir functions but I have no way of getting the angle that I need because I'm drawing a sprite not creating an instance...