This is similar to what describes:
The animations used are standard UDK third person animations, with a custom animation tree.
When aiming, a bone controller is used to bring the weapon to position offset from the head bone, which you need customised for each weapon.
The hands follow via IK.
To ensure a perfect sight picture, the final camera view is fudged slighly until it lines up.
For anyone interested, here is a link: TFP Demo.
I recently found out this is similar to how Crysis 2/3 handles its first person weapon setup:
Place weapon where you want it, use IK to match up hands.
On the other hand, we have Ground Branch:
Animation offsets are used for each weapon position, but the camera is blended between the eye position and a dedicated ‘aim bone’ whenever the player engages the weapons sight.
A dedicated bone was used for several reasons:
- to control what animations affect the players aim.
- to support additional weapon positions.
i.e low/high ready. - to support multiple weapon sights.
- to help the sight picture.
As with the first approach, the final camera view is fudged slighly to ensure a perfect sight picture.
The problem of sway while aiming can be attacked a couple of different ways.
The easiest is to use a static pose while aiming and add any sway via code.
You can see the results of this system here:
For Ground Branch, we use multiple locomotion animations, but I plan to add this sort of system as well as control the play rate of the idle animation.
In the meantime, people testing our tech build are having a hard time hitting things accurately at long distances
As well as this true first person viewpoint setup is working for Ground Branch, it has room for more control and improvement, but we’re sitting on that until after we get something out to the public.
We’ve got enough work to do