We talking Hip fire, or Aim down sight (ADS), or Optics crosshair?
In game pics would be helpful.
In general the crosshair is a standard user widget (controller owned/loaded) that’s 100% centered. This is what the camera is aimed at… center screen. The weapon itself is aligned to point “Roughly” toward it. You’ll drive yourself mad trying to get it perfect with every gun and animation. Yet, we do not need it perfect for shooting straight and what we are aimed at.
Typically for TPS you lock the camera to over the shoulder and use control rotation. Looks like your camera is currently offset to the right. Spring arm length is shorter too.
Also, most TPS toggle to an FPS view (camera on weapon) when you ADS.
i want to make a third person shooter like aim (resident evil 2 remake)
i have tried camera offset x 10 y5 and z 50
yet is the crosshair in the middle but the look of the aim is behind the character and not behind the shoulder.
Instead of trying to pin crosshair to the front sight/muzzle, you could just do 2 traces when shooting. First trace from camera like usual, then trace from the muzzle socket to the hit location from first trace. For instant/hitscan weapons, use that result for the damage/impact fx/ect.. For actual projectiles use the second trace hit to find lookat rot from muzzle to feed the velocity and spawn. Might look like the gun is shooting sideways if camera is in a weird place, but if it’s within a few degrees of the bore axis, most people won’t notice.
It’s not about shooting. That’s easy and you don’t even need a trace to get the shot to hit crosshair. Just simple math. Op wants the gun to line up more visually with where the crosshair is.
Could also do the two traces in tick and move the crosshair widget to it. And probably use a dot product check to hide crosshair if it’s behind the gun.
I just tested various games.
Among them were GTA 5, Saints Row, and Resident Evil.
What I noticed is that when you switch between different weapons and look at their aim logic,
the crosshairs are not always exactly on the weapon; sometimes they seem a little off to the side, sometimes a little too high.
Maybe I’m overthinking it because I never noticed it when playing these games until I tried to do the logic myself.
can you send a screenshot from the blueprint aim logic with the camera settings?
One trick you can use to make the camera line up with the shot better is make a color/vector curve and get the time value from that using the spring arm length to set the target or socket offsets. If you print the arm length and hit play, you’ll know where on the curve needs to be tweaked for that zoom level. Could also do some math on that to fine tune the aim offset anim.
Typically aim offsets use a delta of actor/mesh rotation and the controller’s base aim rotation. But if the cam is in a weird spot, it probably won’t line up.