I'm looking for some help with smoothing between an original float and a target float, where the original float is consistently changing (potentially interfering with interpolation techniques and or Mathf.SmoothDamp)
I tried Mathf.SmoothDamp with the below:
(float rocketBoostPower is a global variable)
float yVelocity = 0.0F;
float tempForce = rocketBoostPower + Input.GetAxis("Mouse Y") * shiftSpeed / 5f;
rocketBoostPower = Mathf.SmoothDamp(rocketBoostPower , tempForce, ref yVelocity, 0.5f);
This doesn't change the force at all however, it just stays locked in place.
I'm currently using the below to change my power, however I want to smoothly change the power instead of just incrementing sharply on each Update frame:
rocketBoostPower += Input.GetAxis("Mouse Y") * shiftSpeed / 5f;
Please can someone help? I need the assumption that every update will receive a new rocketBoostPower value, whilst still smoothing its previous value.