Browse Source

Portrait command now moves portraits using world position instead of anchored position

Setting position using the anchored position was giving unintuitive
behaviour, using world position is much more straightforward.
master
chrisgregan 9 years ago
parent
commit
e13d6c35b0
  1. 2
      Assets/Fungus/Narrative/Scripts/Commands/Portrait.cs

2
Assets/Fungus/Narrative/Scripts/Commands/Portrait.cs

@ -427,7 +427,7 @@ namespace Fungus
float duration = (moveDuration > 0f) ? moveDuration : float.Epsilon;
// LeanTween.move uses the anchoredPosition, so all position images must have the same anchor position
LeanTween.move(character.state.portraitImage.rectTransform, toPosition.anchoredPosition3D, duration).setEase(stage.fadeEaseType);
LeanTween.move(character.state.portraitImage.gameObject, toPosition.position, duration).setEase(stage.fadeEaseType);
if (waitUntilFinished)
{
waitTimer = duration;

Loading…
Cancel
Save