How to setup aim ironsight

Hey guys im testing some things and i got almost everything to work but a single thing is giving me a big headache, because i can’t be able to position a weapon at the center of the camera view so i can shoot with the ironsight aim.
So i’m asking help to center a weapon in the camera view to be able to aim with the ironsight. Help me plz :c

Does this help you?

Yeah i already tried that and it’s working watching from third person, but in first person the ironsight does not collide to where im aiming.

this is what i achieved but i need that when i press for example the RMB the ironsight of the weapon have to collide to the center of the screen like this http://vignette3.wikia.nocookie.net/battlefield/images/1/19/M16A3_Iron_Sights_-_Beta.gif/revision/latest?cb=20110929074625 . How can i achieve this?

have you tried changing the relative location of your arm’s skeletal mesh? or fixing the animation in your modelling app? or lowering the camera while aiming?

i’ve just tried on lowering the camera and these are the results

I can’t understand why it happens to be this way. Anyway i just added a socket on the rifle sight so i could move the camera on that socket when i would press RMB and i followed this BP http://blueprintue.com/blueprint/GzY8znsN/ but why it’s not at the center?What’s wrong?

and this is my BP.

I’m assuming you are using true First Person for this (the player model you see in first person is the same one everyone else does).

My solution is to have a camera on a spring arm which is part of each weapon blueprint. You line it up with the ironsights and it provides a decent sway. After that you have a script which make the camera blend between your first person camera and the weapons ironsights camera when you try to aim. This allows for manual alignment for each weapon.

The harder part ends up being preventing too much camera sway. I did this by having the upper torso use a different, more stable blend space than the feet so the weapon wouldn’t contort as much while moving and aiming.

As the weapon still has a bit too much sway from the feet moving after that to stabilize the weapon while aiming down sights (the scale of a problem this is varies by your animations) you need to have a Transform (modify) bone set to wherever your weapon attach point is. You then have the transform set the weapons rotation to be stable from the body while aiming by using a boolean switch which sets the alpha of the transform between 0 and .9 whenever the player aims down sites.

I’m assuming you are using true First Person for this (the player model you see in first person is the same one everyone else does).

My solution is to have a camera on a spring arm which is part of each weapon blueprint. You line it up with the ironsights and it provides a decent sway. After that you have a script which make the camera blend between your first person camera and the weapons ironsights camera when you try to aim. This allows for manual alignment for each weapon.

The harder part ends up being preventing too much camera sway. I did this by having the upper torso use a different, more stable blend space than the feet so the weapon wouldn’t contort as much while moving and aiming.

As the weapon still has a bit too much sway from the feet moving after that to stabilize the weapon while aiming down sights (the scale of a problem this is varies by your animations) you need to have a Transform (modify) bone set to wherever your weapon attach point is. You then have the transform set the weapons rotation to be stable from the body while aiming by using a boolean switch which sets the alpha of the transform between 0 and .9 whenever the player aims down sites.