Aiming Issues

I’m making a game with a directional aiming system that shoots an arrow in the direction of the mouse when the mouse is clicked. I have a UI object detecting clicks and an aimer that is anchored to the player’s location, wherever that may be. I’ve had an issue where whenever I move away from the starting position a good ways, the aimer no longer points at the mouse correctly. The game is here: http://flowlab.io/game/view/1043667
If anyone can figure out how exactly I can fix this, that’d be great. Thanks. Also I’d like the arrows to point in the direction they travel, but that’s secondary to my other concern.

It looks like the issue is that you need to deal with the fact that the level coordinates and screen coordinates no longer match up once the camera starts scrolling. Here’s an example of how to account for the difference: https://flowlab.io/game/play/685073

That worked, thanks. html5 is working great, by the way.

I have the exact same problem

1 Like

Hi @jin.corp ! Welcome to the flowlab community! However, this topic is five years old. Please do not revive dead topics, jut make new ones. :slight_smile:
Also, when you have a problem, it is very helpfull to the community if you send a link, screenshot, or video of the problem.
Looking at the above topic, my guess is that your gun (or object) is not pointing towards your mouse?