Hallucination system
This commit is contained in:
@@ -253,7 +253,8 @@ namespace Unheimlich.Features.Dialogue.UI
|
||||
{
|
||||
if (!_positionCaptured)
|
||||
{
|
||||
_startLocalPos = transform.localPosition;
|
||||
// Subtract shake offset to get the clean base position, not the shaken one
|
||||
_startLocalPos = transform.localPosition - _shakeOffset;
|
||||
_positionCaptured = true;
|
||||
|
||||
LeanTween.cancel(gameObject);
|
||||
@@ -516,13 +517,15 @@ namespace Unheimlich.Features.Dialogue.UI
|
||||
|
||||
ResetSketchFade();
|
||||
|
||||
// Reset position capture and restart shake immediately — don't rely on a LeanTween
|
||||
// callback for this, since stale tween IDs (Domain Reload disabled) can silently
|
||||
// drop callbacks, leaving some words permanently non-shaking.
|
||||
_positionCaptured = false;
|
||||
StartOrganicShake();
|
||||
|
||||
TweenHelper.MoveLocal(gameObject, _startLocalPos, duration, () => {
|
||||
_positionCaptured = false;
|
||||
|
||||
if (DialogueManager.Instance != null)
|
||||
DialogueManager.Instance.UnlockFocus();
|
||||
|
||||
StartOrganicShake();
|
||||
}, LeanTweenType.easeOutQuad);
|
||||
|
||||
transform.localScale = Vector3.one * _originalScale;
|
||||
|
||||
Reference in New Issue
Block a user