scotsparaman
Member
In a top down scenario, you can use:
facing = point_direction(x, y, mouse_x, mouse_y);
draw_sprite_ext(sprite, subimage, x, y, x_scale, y_scale, "FACING", colour, alpha);
to help prevent rotating mask collisions when using the mouse to aim but how do you do the same thing if you use the keyboard to rotate your object? ie:
if (left_key) {
image_angle += 2;
}
if (right_key) {
image_angle -= 2;
}
How would you incorporate that into the draw_sprite_exe function?
I've searched loads of topics on here, most annoyingly, the ones where people have stated they have found a solution they haven't posted what it is...
thanks
facing = point_direction(x, y, mouse_x, mouse_y);
draw_sprite_ext(sprite, subimage, x, y, x_scale, y_scale, "FACING", colour, alpha);
to help prevent rotating mask collisions when using the mouse to aim but how do you do the same thing if you use the keyboard to rotate your object? ie:
if (left_key) {
image_angle += 2;
}
if (right_key) {
image_angle -= 2;
}
How would you incorporate that into the draw_sprite_exe function?
I've searched loads of topics on here, most annoyingly, the ones where people have stated they have found a solution they haven't posted what it is...
thanks