Exemplo n.º 1
0
    public static void CalcBlendPctByFunc(EViewTargetBlendFunction inIndirectViewSightFunc, float inIndirectViewSightExp, float DurationPct, out float BlendPct)
    {
        BlendPct = 0f;
        switch (inIndirectViewSightFunc)
        {
            case EViewTargetBlendFunction.VTBlend_Linear:
                BlendPct = Lerp(0f, 1f, DurationPct);
                break;

            case EViewTargetBlendFunction.VTBlend_Cubic:
                BlendPct = CubicInterp(0f, 0f, 1f, 0f, DurationPct);
                break;

            case EViewTargetBlendFunction.VTBlend_EaseIn:
                BlendPct = FInterpEaseIn(0f, 1f, DurationPct, inIndirectViewSightExp);
                break;

            case EViewTargetBlendFunction.VTBlend_EaseOut:
                BlendPct = FInterpEaseOut(0f, 1f, DurationPct, inIndirectViewSightExp);
                break;

            case EViewTargetBlendFunction.VTBlend_EaseInOut:
                BlendPct = FInterpEaseInOut(0f, 1f, DurationPct, inIndirectViewSightExp);
                break;
        }
    }
Exemplo n.º 2
0
 /// <summary>
 /// Set the view target blending with variable control
 /// @param NewViewTarget - new actor to set as view target
 /// @param BlendTime - time taken to blend
 /// @param BlendFunc - Cubic, Linear etc functions for blending
 /// @param BlendExp -  Exponent, used by certain blend functions to control the shape of the curve.
 /// @param bLockOutgoing - If true, lock outgoing viewtarget to last frame's camera position for the remainder of the blend.
 /// </summary>
 public extern virtual void SetViewTargetWithBlend(AActor NewViewTarget, float BlendTime = 0.000000f, EViewTargetBlendFunction BlendFunc = EViewTargetBlendFunction.VTBlend_Linear, float BlendExp = 0.000000f, bool bLockOutgoing = false);