Module |
|
Header |
/Engine/Source/Runtime/Engine/Public/AlphaBlend.h |
Include |
#include "AlphaBlend.h" |
Source |
/Engine/Source/Runtime/Engine/Private/AlphaBlend.cpp |
void Reset()
Reset functions -
The distinction is important.
We have 3 different reset functions depending on usability
Reset function : will change Blended Value to BeginValue, so that it can start blending That is only supposed to be used when you want to clear it up and restart
ResetAlpha will change AlphaLerp/AlphaBlend to match with current Blend Value, that way we keep the current blended value and move to target using the current value That will make sure this doesn't pop when you change direction of Desired
ResetBlendTime will change BlendTimeRemaining as well as possibly weight because if BlendTimeRemaining <= 0.f, We'll arrive to the destination
The reason we need ResetAlpha and ResetBlendTime is that we don't want to modify blend time if direction changes or we don't want to reset alpha if blend time changes Those two have to work independentlyReset to zero / restart the blend. This resets whole thing.