forked from cgvr/DeltaVR
NPCs move quest marker around to next objectives
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user