Hey! i can't seems to wrap my head around how to make the hudtext entries stay still on the place it has been spawned.

Basically i want the text to stand still on the place my character got hit while my character is moving.
in Update in hudtext:
for (int i = mList.Count; i > 0; )
{
Entry ent = mList[--i];
offset = Mathf.Max(offset, ent.offset);
if (uiCamera != null)
{
Vector3 pos = gameCamera.WorldToViewportPoint(ent.instPos);
// Determine the visibility and the target alpha
int isVisible = (gameCamera.orthographic || pos.z > 0f) && (pos.x > 0f && pos.x < 1f && pos.y > 0f && pos.y < 1f) ? 1 : 0;
bool vis = (isVisible == 1);
// If visible, update the position
if (vis)
{
pos = uiCamera.ViewportToWorldPoint(pos);
pos = transform.parent.InverseTransformPoint(pos);
pos.z = 0f;
ent.instPos = pos;
ent.label.transform.localPosition = new Vector3(ent.instPos.x, ent.instPos.y, 0);
offset += Mathf.Round(ent.label.cachedTransform.localScale.y * ent.label.fontSize);
}
}
Thanks in advance
