I'm trying to make the gun look at a nearby enemy, but instead, it just looks at a random general direction, and doesn't appear to be focusing on anything.
Here's the code:
target = body.global_transform.origin
target.x -= 179
Here's what it's doing:
What do I do?