Custom Weapon Crosshair Offset

Hello guys is me here again. Each new thing I learn in uscript makes me love UDK more, however there is still a lot to learn, and as always I need help from the pros here.

How can I change the crosshair offset on screen for a specific weapon? There is the variable Crosshaircoordinates on utweapon (CrossHairCoordinates=(U=128,V=0,UL=64,VL=64)) default properties however it is only to draw the crosshair icon (select the desired icon from the sprite sheet).

Because of my character’s pistol aiming animation whenever i shoot the bullet does not hit the Center of crosshair. I changed fireoffset so that the bullet (which is a real projectile) appears as it is being ejected from the weapon itself, however I would need to change just a bit the crosshair offset to make the bullet hit the center of the crosshair, which seems to be centered on the screen.

Any tips?

This might seem like a really dumb fix, but I’ll bet it would work… Could you just draw the crosshair off-center of the texture, and keep drawing the crosshair in the middle of the screen for all the weapons?

@Nathaniel3W

Hello my friend, as always helping me :smiley:

Yes I thought this way also, it worked, however in the end I found a better solution which was so simple, just adjust the player view camera offset on my custom pawn (I am using the BehindView Camera):

CamOffset = (X=6, Y=15, Z=-28);

This way it gives the impression that the bullet is coming out from the gun, then I just rotate some degrees the weapon on the skeletal mesh editor and then voila!!!

In the end, what matters is what the player sees, so if for the player it looks good, so that’s fine, even if is not perfect!

Cheers.