Item in 3d coords then convert it into 2D GUI position

Has anyone tried any of the LEGO games? Batman, Indiana Jones, Harry Potter, Star Wars.

When you smash things up, you often get some gold and silver coins. When you run through these they go from the 3D perspective in the gamelevel and floats up into your GUI/scoreboard either in the top or bottom of your screen.

How can we do this with unity I think…

We know where the hero are, so if we take the coords of Hero, we need to figure out what 2D coords these corresponds to.

Then make a “float/slide” from these values into the right spot in the GUI.

So thats my solution, but I cant seem to find the function converting the 3D coords into 2D.

Anyone up for this?

Use Camera.main.WorldToScreenPoint.