This is a top-down game. Tha camera is supposed to center on you as you walk, and it worked just fine for the past few days that I've been working on this. A few days ago I coded in an attack that shoots a beam out in the direction you press, and it worked great! But now -- I don't know what I changed -- it's bugging out. As you walk, the point of origin that the beam starts at gets farther and farther from you, until they appear to be coming in from off-screen.
The only thing I can think of is that yesterday I changed it so that instead of being one sprite, the player character is two objects: feet/shadow and upper body/cloak. So maybe the beam is being created relative to an invisible sprite that is moving faster than me but doesn't have the camera centered on it? But even so, this problem never showed up until just a few hours ago, so that seems unlikely.
You walk with WASD and shoot with the arrow keys. Sorry, but the code is pretty cobbled together; it might be hard to find a solution just by looking at it.
capx: https://www.dropbox.com/s/s685o8d3c1pok ... .capx?dl=0