Browse Source

PortraitController move interrupt

Now cancels any existing tweens on the central holder when a new move is issued. Now exhibits clear snapping rather than occasional jerking back n forth
master
shalliwell 5 years ago
parent
commit
86c5230613
  1. 2
      Assets/Fungus/Scripts/Components/PortraitController.cs

2
Assets/Fungus/Scripts/Components/PortraitController.cs

@ -296,6 +296,8 @@ namespace Fungus
{ {
CleanPortraitOptions(options); CleanPortraitOptions(options);
LeanTween.cancel(options.character.State.holder.gameObject);
// LeanTween doesn't handle 0 duration properly // LeanTween doesn't handle 0 duration properly
float duration = (options.moveDuration > 0f) ? options.moveDuration : float.Epsilon; float duration = (options.moveDuration > 0f) ? options.moveDuration : float.Epsilon;

Loading…
Cancel
Save