16
Modding / Re: How can I alter iron sight animation?
« on: 22-07-2018, 05:07:07 »
OK, I seemed to have figured it out. In the weapon's animationsystem1p.inc file, there is a line near the top called:
animationSystem.cameraSpring.amplitude which had values of 0.03/0.02/0.03.
It appears the 1st number controls how much the weapon swings to the side (and how far the iron sights drift out of alignment) when it's moved laterally.
The 2nd number controls how much the weapon swings up or down (and sights drift) when it's moved vertically.
Haven't figured out what the 3rd number does.
I dropped the values to:
animationSystem.cameraSpring.amplitude 0.001/0.001/0.02
and now the iron sights stay almost perfectly aligned when you swing the rifle around. If you know to look you can see them drift just a tiny fraction. I imagine even smaller values will virtually lock it in place, but this is sufficient for me.
I did drop the 3rd number a bit to see if there was any effect, but didn't see any difference. Might have been too small a change to notice anything.
Curiously, the Colt 1911's amplitude numbers are quite a bit higher at 0.1/0.035/0.2, yet its irons sights remain rock steady as you swing it around. Perhaps because it's a smaller/lighter weapon?
So, that's apparently what cameraSpring.amplitude does....
animationSystem.cameraSpring.amplitude which had values of 0.03/0.02/0.03.
It appears the 1st number controls how much the weapon swings to the side (and how far the iron sights drift out of alignment) when it's moved laterally.
The 2nd number controls how much the weapon swings up or down (and sights drift) when it's moved vertically.
Haven't figured out what the 3rd number does.
I dropped the values to:
animationSystem.cameraSpring.amplitude 0.001/0.001/0.02
and now the iron sights stay almost perfectly aligned when you swing the rifle around. If you know to look you can see them drift just a tiny fraction. I imagine even smaller values will virtually lock it in place, but this is sufficient for me.
I did drop the 3rd number a bit to see if there was any effect, but didn't see any difference. Might have been too small a change to notice anything.
Curiously, the Colt 1911's amplitude numbers are quite a bit higher at 0.1/0.035/0.2, yet its irons sights remain rock steady as you swing it around. Perhaps because it's a smaller/lighter weapon?
So, that's apparently what cameraSpring.amplitude does....