I am working on an ADS system that is driven by procedural animations from IK. I’m Currently using some vector math to align the sights to the center of the camera by taking the camera forward vector and adding the sight offset (see screenshots). However, I am experiencing lag when changing aim vertically. The sights will trail behind the crosshair HUD slightly. I assume this is due to tick or calculation delay from the vector math running each frame. Is there a way I can remove this delay and perfectly match the camera forward vector with this setup? Why exactly is this happening?
Some Notes
-
I am only using 1 camera
-
The weapon is attached to the mesh, but not in a socket. The weapon movement drives the animation for the hands and arms.
-
Horizontal aiming does not lag. I assume because it can just inherit the rotation from the controller and doesn’t have to move independently of the mesh.
-
Ironsight update function is called by event tick for testing purposes.
Screenshots
Thanks for any help or suggestions. It’s greatly appreciated.