Mouse Position is incorrect?

Recently I’ve been noticing a problem with my hit scan in one of my games. Demonstration here:

As you can see the part placed on mouse.hit.position is offset above my actual mouse cursor. Does anyone know what’s going on?

There are two things that can be happening:

  1. The gun’s hitscan is narrowly incorrect by angle or end position.
  2. The crosshair is not exactly on the mouse’s position.

I don’t understand how the guns hitscan isn’t correct as it uses mouse.Hit

Can’t be #2 because there is a frame that is positioned in the exact center of the screen and the mouse seems to line up with it well.

Oh wait, now I see it after carefully reviewing the demonstration. Apparently the hitscan is done mid-way through its recoiling camera. It seems that the shot isn’t done first before the recoil or that both things are asynchronous to each other.

Oh my god I’m so dumb. Thank you so much!

1 Like