So I have my own ads animations for my weapon that are based off of the assault rifle and made it so the player can switch between ironsights and holosights.
The problem is that when they switch the gun is to far down as the sight is shorter than the iron sight, so i tried making something that takes the camera location and AimPoint socket in the iron sight and holosight to find difference in location then moveing the gun bone up so the holosight is in the middle but ironsight wont move as it already in middle.
The only thing is it works when aiming straight ahead but not when looking up or down as it moves the gun bone to far up or down. And it is only straight when im looking forward as i moved the socket for ads a little above the actual middle and for the holosight way below the actual middle. Does anybody know how i can make it so i keep socket in middle point of sights and move gun bone same when looking up down and forward.
My character setup is
Pivot component
Character arms
camera
Pivot component is what rotates arms up and down which rotates camera when i look up and down