HorizonTweenPlugin  4.17.0
The mainpage documentation

The goal of thie plugin is to provide on the fly tweening animation for UE4 with full control of tween event.

Please check DemoProject for how to use this plugin.

Support Email: dorgo.nosp@m.nman.nosp@m.@hotm.nosp@m.ail..nosp@m.com

Blog: http://dorgon.horizon-studio.net/

UE4 MarketPlace: https://www.unrealengine.com/marketplace/profile/dorgon%20chang


Q1. How to bind callback event?

For Blueprint user, you can bind event this way:

BindCallback

For Plugin Version after 1.2.0 ( or engine version 4.15.0 ) , you can also use Proxy creation version in Blueprint, like following image:

HorizonTweenSystemProxy

You can see there has two BP node, first one is old method, you can still create tween event with this method, but second BP node are more convenient, because it already has OnTweenStart, OnTweenUpdate, OnTweenLoop, OnTweenFinished callback pin that you don't need to bind callback event manually. You can find those method by right click in EventGraph, all tween creation method put under HorizonPlugin|TweenSystemProxy category.

For C++ user, you can bind Callback using following method: Check all supported callback binding method here

Sample Code:

// need mark UFUNCTION() in header
void AYourClass::MyTweenStartFunc(UHorizonTweenEvent* pTweenEvent){
// fire your custom function here when tween start
}
void AYourClass::OnMyTweenLoop(UHorizonTweenEvent* pTweenEvent){
//fire your custom function here when begin tween loop
}
void AYourClass::YourFunction(UHorizonTweenEvent* pEvent){
pEvent->OnTweenStartNative.AddUFunction(this, "MyTweenStartFunc");
pEvent->OnTweenLoopNative.AddUObject(this, &AYourClass::OnMyTweenLoop);
pEvent->OnTweenUpdateNative.AddLambda([](UHorizonTweenEvent* pTweenEvent) {
// fire your custom function here when tween update
});
pEvent->OnTweenFinishedNative.AddLambda([this](UHorizonTweenEvent* pTweenEvent) {
// fire your custom function here when tween finished.
});
}

Q2. What is the differnet between HorizonTweenSystemProxy and HorizonTweenSystem?

Basically they are doing samething that you can use both method to create same function, like following picture:

ProxyCreate

The difference is that HorizonTweenSystemProxy can be only used in blueprint, it is inheritated from BlueprintAsyncActionBase (with clock mark ) that bind all default callback for you. It is convenient for BP user in some case, but like other AsyncNode in ue4, it can only be acessed from BP Event Graph. If you want to use plugin in C++ or BP function, please use HorizonTweenSystem instead.

Following picture shows BP category that you can find those async proxy node in BP:

AllProxyCreateEvent


Q3. Can't build DemoProject provided in Github?

  1. Please check if you already install Visual Studio 2015 or 2017.
  2. Check if you use correct demo project version: open *.uproject with text editor, and check "EngineAssociation". If you didn’t have association engine version, please download from Epic Games Launcher.

Q4. What is LerpModeExtraParameterList in FHorizonTweenEventParameters?

Currently, following LerpMode will use LerpModeExtraParameterList's Last Parameter in it's lerp algorithm: InterpEaseIn, InterpEaseOut, InterpEaseInOut, ElasticIn, ElasticOut, ElasticInOut(other mode will simply ignore this parameter)