Math help with calculating spread percentages

Understanding:

With my guns, I have the spread multiplied by certain values. E.g., a crouching value is default 1, but when the player is crouching it is 0.5 and that is then multiplied by the normal spread values.

For aiming, say I wanted the spread to be 20% of what it currently is then the AimValue would tween from 1 to 0.2.

The aiming speed isn’t instant, it varies per gun.

What I need help with:

I have values for RecoilX,RecoilY,RecoilZ, which are all 1 when not aiming and will be a custom value when fully aiming.

Say I had it so when fully aiming:

AimValue = 0.6
RecoilY = 0.2

How could I make it so RecoilY will be 0.2 when the AimValue is 0.6?
(The other recoil values will work the same way)

This is probably really simple lol

1 Like