B
Barack Pálinka
Guest
Hey guys,in game maker i've created a weapon and an enemy objecct and i want the weapon to face the moving enemy,so basically i want the weapon's barrel to face the enemy.
I have tried it with this code:
if(instance_nearest(x, y, obj_enemy)) {
image_angle = point_direction(x, y, obj_enemy.x, obj_enemy.y);
}
Thanks in advance.
I have tried it with this code:
if(instance_nearest(x, y, obj_enemy)) {
image_angle = point_direction(x, y, obj_enemy.x, obj_enemy.y);
}
Thanks in advance.