How could I make it so that raycasts always hit my crosshair in the middle of the screen? The script is on my gun which is to the right of me, so the raycast goes to the right.
I think you'd be better off ignoring the gun position for aiming, and just doing a straight raycast right down the center of the screen. You could then draw a line or something from the gun to the target, for effect.
Otherwise, you get a diagonal raycast (with respect to the screen) and the crosshair will only be correct for one paticular distance.
answered May 21 '11 at 05:11 PM