This question already has an answer here:
- Mouse location is off due to camera 1 answer
I made a short video of this.
Basically, when the screen scrolls with the camera, the character begins firing at the incorrect mouse position. You can see where I am clicking the whole time. As we move towards the right edge (the more we scroll), you'll notice the distance away from the correct position increases. The shooting mechanic worked just fine before I added the camera.
I'm using a translation matrix to implement my camera.
What could be causing this?