Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | GerryC1230 |
I want my character to fire from the muzzle for when the gun sprite is flipped left and right. He’s only firing on the right side from the muzzle and if someone can help me, Please help
Here’s the code
if global_position.x > get_global_mouse_position().x:
$Glock/glock/Position2D.scale.y = 1
$Glock/glock.scale.y = -0.5
else:
$Glock/glock/Position2D.scale.y = 1
$Glock/glock.scale.y = 0.5
If anybody needs more info to help me solve the problem tell me.