Lining up ironsights on first person animations

Hey all.

Anyone done this before? I’m trying to think through animating a weapon with an ironsight view and it struck me that there’s a problem. I’m assuming you animate the weapon+arms such that at the ironsight position the weapon points directly down a single axis at the origin of the animation (i.e. the center line of any scope would then point straight down the +X axis with no Z or Y value), then you’d animate the lowered + relaxed arm positions based on that (i.e you would animate from ironsight down to the others, rather than animate up to iron sight view, although now I think about it I doubt it makes much difference).

Anyway, I see a problem if you then want to change the gun position a bit when its in its lowered pose, because the FOV might mess with some of the positioning etc.

So my question is, do you have some additional transform in code for when you do that transition from ironsight to lowered? It would kind of make sense to me to be able to specify a transform offset for each weapon position in case you want to tweak individual weapons in-game? Or am I overthinking things?

Also, with this setup, it seems that individual weapons with ironsights then need separate animations because the ironsight might be at different positions on the various weapons etc.

Just wondered what people’s experience was with this.

I don’t really understand what you’re saying in your first paragraph, or what problem there might be with messed up FOV.
Traditionally every weapon has its unique aim/hip animation. You just line it up with a camera in your animation package. You can look at the ShooterGame, they have two animated first person weapons.

In a traditional FPS viewpoint, you could go about creating the iron sight / non-iron sight poses via animations, offsets, IK or combinations there of.
From the sounds of it, an IK based solution would probably work well for you.
Position the main weapon where ever you want it and IK handles all the arm and hand positions.

The problem is that each weapon might need different placements for the ironsight view and the non-ironsight view. Sometimes weapons look weird when non-ironsighted because you cannot see enough of them etc. So you want to be able to move them around, but the ironsight view needs to be very precise so that the ironsight/scope lines up with the center of the screen for accurate aiming.

I guess there could be a set of IK targets for the hands per-weapon, which would be easier than doing all animations. Would have the side effect of allowing for some procedural motion too. I guess I could add the IK offsets into the weapon class so that each weapon describes its own IK offsets for ironsight/non-ironsight. Just wondering if it isn’t easier to do a couple transforms and interpolate those.

Thanks for the feedback.