Generation

generate functionMon, 05 Dec 2022

attach to an object a tooltip with the sign "Follow me!" make the tooltip always face the player

public void FollowMe(GameObject target) { GameObject tooltip = new GameObject("Tooltip"); tooltip.AddComponent<TextMesh>(); tooltip.transform.position = target.transform.position + new Vector3(0f, 1.2f, 0f); tooltip.transform.rotation = Quaternion.Euler(90f, 0f, 0f); tooltip.transform.parent = target.transform; tooltip.GetComponent<TextMesh>().text = "Follow Me!"; } FollowMe(player);

Want to kickstart your project?Use the new AI Studio to create your code