diff --git a/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity b/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity index 7c51c133..80849659 100644 --- a/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity +++ b/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:178278d70491e7cd918ca216dae0bc8f5e9411096b44c44d7198f2ecc5b9bf08 +oid sha256:4c4a0a1e23411dec4565064f4ae64ed45d5952cb97eda18442de9f7c420e0a36 size 68552814 diff --git a/Assets/_PROJECT/Scripts/ModeGeneration/QuestMarker.cs b/Assets/_PROJECT/Scripts/ModeGeneration/QuestMarker.cs index 49baf476..03d307da 100644 --- a/Assets/_PROJECT/Scripts/ModeGeneration/QuestMarker.cs +++ b/Assets/_PROJECT/Scripts/ModeGeneration/QuestMarker.cs @@ -1,5 +1,4 @@ -using System.Collections; -using System.Collections.Generic; +using DG.Tweening; using UnityEngine; public class QuestMarker : MonoBehaviour @@ -8,6 +7,7 @@ public class QuestMarker : MonoBehaviour public float amplitude = 0.1f; // How far up/down it moves public float frequency = 1.5f; // Speed of oscillation public float heightAboveTarget = 0.75f; + public float moveToTargetDuration = 2f; private Vector3 startPos; private Transform playerTransform; @@ -57,13 +57,13 @@ public class QuestMarker : MonoBehaviour public void MoveTo(Transform target, bool attach = false) { - transform.position = target.position + new Vector3(0, heightAboveTarget, 0); - if (attach) + hoverAboveTransform = null; + transform.DOMove(target.position + new Vector3(0, heightAboveTarget, 0), moveToTargetDuration).OnComplete(() => { - hoverAboveTransform = target; - } else - { - hoverAboveTransform = null; - } + if (attach) + { + hoverAboveTransform = target; + } + }); } }