crkellen / bands

A real-time online multiplayer CTF shooter game
GNU General Public License v3.0
5 stars 4 forks source link

Projectile is slightly off when out of deadzones #52

Open crkellen opened 7 years ago

crkellen commented 7 years ago

Please fill out this Issue template to the best of your ability!

Type of Issue

Hint: Design Issues or Requests are changes to existing features, not new ones.

Description of the Issue:

Projectile doesn't reach the exact spot the mouse is aiming when outside of deadzones.

Steps to reproduce the Issue (For Bugs):

When outside of deadzones, aim directly to your left, the projectile will be slightly off from it's mark.

Additional comments or information:

I have a feeling I know what this issue is, but adding this just in case it proves to be more difficult than I thought.

crkellen commented 7 years ago

This has something to do with using clientY. It only seems to be an issue when out of the Top deadzone.

crkellen commented 7 years ago

If the game is first loaded while on a 1920x1080 monitor, everything works. However, if the game is first loaded while on a 1600x900 monitor, the calculation is off, until you move it to the bigger monitor then back.

I think this may be solved by having proper scaling. If not, I'll look into the whole clientX/Y thing.