1
0
forked from cgvr/DeltaVR

NPCs move quest marker around to next objectives

This commit is contained in:
2026-02-12 15:54:01 +02:00
parent 3d804dfdaf
commit cf709f4dc9
5 changed files with 29 additions and 3 deletions

View File

@@ -7,6 +7,7 @@ public class QuestMarker : MonoBehaviour
public Transform movingPart;
public float amplitude = 0.1f; // How far up/down it moves
public float frequency = 1.5f; // Speed of oscillation
public float heightAboveTarget = 1f;
private Vector3 startPos;
private Transform playerTransform;
@@ -47,4 +48,9 @@ public class QuestMarker : MonoBehaviour
playerTransform = null;
}
}
public void MoveTo(Transform target)
{
transform.position = target.position + new Vector3(0, heightAboveTarget, 0);
}
}