Download

HorizonTween Plugin: on the fly tweening animation for UE4

Hi, My new plugin are just released on marketplace:

https://www.unrealengine.com/marketp…ontween-plugin

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

DemoVideo
Tutorial Video
Demo Project
Document

If there has any bugs or you need any support, you can contact me by support email or just leave message here.

Thanks!

Version History
*4.19.0

  • New: MultiTween Event for Actor, SceneCompoent and Widget, check video demo here
  • New: Implement GetTimeRange for FHorizonTweenEventCustomCurve and FHorizonTweenEventCustomColorCurve
  • New: Add UHorizonTweenEvent::GetTweenSystem
  • Refactor: change .h and .cpp folder structure
  • Refactor: meta = (EditCondition = “bUseCustomCurve”) for Custom curve
  • Refactor EventMacro
  • Refactor: Change widget dependency module from PrivateDependencyModuleName to PublicDependencyModuleName
  • Refactor Classes folders

*4.18.0

  • REFACTOR: Change the inheritance of AHorizonTweenSystem from AActor to AInfo.

*4.17.0

  • UPDATE: Update to engine 4.17.0, and plugin’s VersionName will also follow engine’s version.
  • UPDATE: Now BP user can call GetCurrentLerp in any TweenEvent for customize their own tween event.
  • UPDATE: Refactor parameter name: pTarget to TweenTarget for BP display in TweenSystem’s tween creating function.
  • NEW: implement StopTweenEventByObject, PlayTweenEventByObject, ResumeTweenEventByObject, RemoveTweenEventByObject, FinishTweenEventByObject in TweenSystem. If your UObject are associated with a TweenEvent in TweenSystem, then it will execute corresponding action.
  • NEW: implement global DefaultTweenSystem and CreateDefaultTweenEventFunctions for all exist tween events.
  • New: implement CreateTweenBaseTypes(float FVector, FVector2D, FRotator, SplinePath)
  • Refactor: redesign blueprint function Category, all functions in plugins are put into relative Category group. Currently all Plugin functions are grouped into following Category: HorizonPlugin|TweenFunctionLibrary, HorizonPlugin|TweenSystemLibrary, HorizonPlugin|TweenSystemLibraryProxy, HorizonPlugin|TweenSystemProxy. TweenFunctions in TweenSystemLibrary and TweenSystemLibraryProxy will use global DefaultTweenSystem to create TweenEvents.
  • Deprecated: paramImpl.bShortestPath in CreateTweenActorRotatorFromToEventWithParam and CreateTweenSceneComponentRotatorFromToEventWithParam are deprecated and will be removed in future plugin release, please recreate paramImpl and use bUseShortestPath instead.

*1.2.1

  • upgrade engine version to 4.16

*1.2.0

  • UPDATE: upgrade engine version to 4.15
  • NEW: Add HorizonTweenSystemProxy for blueprint user, now you can create an async node in EventGraph for all TweenEvent. All tween creation method put under HorizonPlugin|TweenSystemProxy category. Please check HorizonTweenPlugin: The mainpage documentation for more detail.

*1.1.0

  • UPDATE: upgrade engine to 4.14
  • MEW: add FinishTweenEventByName and FinishAllTweenEvent with param bTweenToEnd that can control if we want to set current tween alpha to 1 before finish the event.

*1.0.1 - FIX package error by adding category to all parameter, ref: https://answers.unrealengine.com/que…de-plugin.html

*1.1.0
[update] upgrade engine to 4.14
[new] add FinishTweenEventByName and FinishAllTweenEvent with param bTweenToEnd that can control if we want to set current tween alpha to 1 before finish the event.

@dorgon

Does your project support a solution to the following collision limitation?

Can the tweened objects push idle characters without clipping through them?

Hi, Did you mean you need function in this video?

https://youtu.be/oIfivr9Vq7E

Or I think you can check collision in OnTweenUpdate and call your custom function to implement your own collision behavior.

Yes I believe that’s it, my project needs to be allow the player to be pushed by the moving objects. It looks like your blueprint handles this well.

Hi,

Just Enable Simulate Physics, then your object can be pushed by tweened object.

version 1.0.1 update!
If you have trouble in package your game after enable this plugin,
please make sure plugin version equal or larger than 1.0.1.

*1.1.0
[update] upgrade engine to 4.14
[new] add FinishTweenEventByName and FinishAllTweenEvent with param bTweenToEnd that can control if we want to set current tween alpha to 1 before finish the event.

Can you think of any reason why HorizonTween would always seem to want to rebuild itself whenever I do a solution build (even when it hasn’t been dirtied)?

hi, Did you copy the plugin from Engine/Plugins/Marketplace to your own PROJECT/Plugins folder?

I think you can try to clear Intermediate and Binaries folder under your project and build again.

Hrm. I thought I did that, but they could have stuck around. Thanks much. <3

*1.2.0
[update] upgrade engine to 4.15
[new] Add HorizonTweenSystemProxy for blueprint user, now you can create an async node in EventGraph for all TweenEvent. All tween creation method put under HorizonPlugin|TweenSystemProxy category. Please check HorizonTweenPlugin: The mainpage documentation

Add New DemoVideo and Tutorial Video

Version History

*4.19.0

  • New: MultiTween Event for Actor, SceneCompoent and Widget, check video demo here
  • New: Implement GetTimeRange for FHorizonTweenEventCustomCurve and FHorizonTweenEventCustomColorCurve
  • New: Add UHorizonTweenEvent::GetTweenSystem
  • Refactor: change .h and .cpp folder structure
  • Refactor: meta = (EditCondition = “bUseCustomCurve”) for Custom curve
  • Refactor EventMacro
  • Refactor: Change widget dependency module from PrivateDependencyModuleName to PublicDependencyModuleName
  • Refactor Classes folders

*4.18.0

  • REFACTOR: Change the inheritance of AHorizonTweenSystem from AActor to AInfo.

*4.17.0

  • UPDATE: Update to engine 4.17.0, and plugin’s VersionName will also follow engine’s version.
  • UPDATE: Now BP user can call GetCurrentLerp in any TweenEvent for customize their own tween event.
  • UPDATE: Refactor parameter name: pTarget to TweenTarget for BP display in TweenSystem’s tween creating function.
  • NEW: implement StopTweenEventByObject, PlayTweenEventByObject, ResumeTweenEventByObject, RemoveTweenEventByObject, FinishTweenEventByObject in TweenSystem. If your UObject are associated with a TweenEvent in TweenSystem, then it will execute corresponding action.
  • NEW: implement global DefaultTweenSystem and CreateDefaultTweenEventFunctions for all exist tween events.
  • New: implement CreateTweenBaseTypes(float FVector, FVector2D, FRotator, SplinePath)
  • Refactor: redesign blueprint function Category, all functions in plugins are put into relative Category group. Currently all Plugin functions are grouped into following Category: HorizonPlugin|TweenFunctionLibrary, HorizonPlugin|TweenSystemLibrary, HorizonPlugin|TweenSystemLibraryProxy, HorizonPlugin|TweenSystemProxy. TweenFunctions in TweenSystemLibrary and TweenSystemLibraryProxy will use global DefaultTweenSystem to create TweenEvents.
  • Deprecated: paramImpl.bShortestPath in CreateTweenActorRotatorFromToEventWithParam and CreateTweenSceneComponentRotatorFromToEventWithParam are deprecated and will be removed in future plugin release, please recreate paramImpl and use bUseShortestPath instead.

*1.2.1

  • upgrade engine version to 4.16

Hello,

I was trying to find the best way to play a tween in c++. I am currently using the CreateTweenEventWithParameter method but using the callback documentation to trigger the tween inside a function. I was trying to store the tweenevent in a variable but it seems like I have to call the CreateTweenEvent everytime to get it to play. Is there a more straightforward way to trigger the same tween over and over again?

Also, what is the best way to chain tweens? Can I just call another one on the onfinished callback of the first tween?

Thanks in advance.

hi,

Tween event is designed in fire and forget pattern, HorizonTweenSystem will delete any finished tween events.

if you want to reuse tween event, you can:

  1. Set NumOfLoop to 0(so it never finish and deleted by tween system)
  2. In OnTweenLoop callback, call UHorizonTweenEvent::Stop() or UHorizonTweenEvent::Pause().
  3. When you want to start the tween, you can call UHorizonTweenEvent::Play() or UHorizonTweenEvent::Resume() to replay tween.

>>Also, I was wondering the best way to chain tweens together. Since I basically am trying to fade up and fade down an effect once the other tween is finished.

I think you can chain those event in one of these callback:
OnTweenStartNative
OnTweenUpdateNative
OnTweenLoopNative
OnTweenFinishedNative
ex:
TweenList[0]->OnTweenLoopNative.AddLambda([TweenList](UHorizonTweenEvent* InTweenEvent)
{
TweenList[0]->Stop();
TweenList[1]->Start();
}
);

Or you can write another Manager to arrange dependencies of your tween events.

When I have it reverse, the first alpha value is 0.0 instead of 1.0, may I ask why?

oh…
Just find out there has some bug in Reverse PlayMode.
CurrentAlpha are returned before it update to correct value at first frame update.

I will fix this ASAP.

Sorry for inconvenience.

hi,
4.20.1 is in live, and it should fix the bugs.

*4.20.1

  • BugFix: Expose bUseCustomCurve for BP to fix bUseCustomCurve are set to true by engine.
  • BugFix: CurrentDuration and CurrentAlpha value in UHorizonTweenEvent::Finish(bool bTweenToEnd = true)
  • BugFix: CurrentAlpha in UHorizonTweenEvent::Finish for EHorizonTweenPlayMode::PingPong