Search code examples
unreal-engine4

Forward facing vector is a bit offset


I am making an FPS game and I need for the forward facing vector to hit exactly where the crosshair is aiming. This is my current blueprint.

It takes all references from the camera position where the players head should be. (as it usually is in FPS games).

When "shooting" the vector it is slightly offset though. (pink dot near crosshair)

Things I have tried:

  1. Increasing distance of vector makes the problem go away but it then becomes inconsistent, which means it's a bad solution to the problem :(
  2. Manually changing axis values, but that was also very inconsistent.
  3. Changing between 3 different nodes of taking rotation from the camera, they all (didn't) work the same way :/

Maybe there is an issue of the values that I am taking, although the starting position of the camera seems to be correct.

Thank you for any insight you may have!


Solution

  • Suggested by user Ruzihm the issue was that the crosshair was off-center. My blueprints were actually okay. So for anyone looking see if your crosshair is in the center.