I am trying to keep track of the axis value of the Right Trigger of an X-Box 360 controller. Upon further research, I have found that the axis volume is kept in aRightAnalogTrigger in PlayerInput. Using this value, I can obtain the axis value of the trigger when I press it.
Now here's my problem: I am trying to make a "stream" type of weapon (constantly shooting projectiles over time) variable depending of the Right Trigger's axis value. Here below is the code I use to verify the value of aRightAnalogTrigger before generating a projectile (Testing purposes only) in the weapon class.
The result is not really what I expected. The axis value appears when I push down, but as soon as the second projectile is shot, the value of aRightAnalogTrigger is 0.0 instead of the absolute axis value of my trigger until I release the trigger and push it again. Is there a way to change this to obtain a constant value that I can use to make my stream variable?
simulated function Projectile ProjectileFire()
local float RightTriggerAxis;
RightTriggerAxis = PlayerController(Pawn(Owner).Controller).PlayerInput.aRightAnalogTrigger;