Fetching the center co-ordiantes of GUITexture and GUItext as World Co-ordiantes

Hello,

So pop up damage indicators on my characters have becoem to much. I want the healing to appear over the health bar instead. The health bar is a GUItexture, so it’s co-ordinates range from 0,0 to 1,1 as you’re aware.

I have tried using Camera.ScreenToWorldPoint(healthBar.transform.position), without any luck, the text just instantiates in the center of the screen. i.e.

hObject = Instantiate(popUpHealing2,Camera.ScreenToWorldPoint(healthBar.transform.position),popUpDamage.transform.rotation);

the expected behavior is that the little numbers will appear and float up(that script works) on the health bar.

The current behavior is that the text appears center screen, atop the player.
Thanks.

I wound up using a pre positioned GUItext to get the job done. And no, screenPOint etc was returning zeros, as was the inverse. How odd, because rayCasting to the nearclip returned the position of the GUItext…

Unfortunately the element spawned floated off screen and was behind the GUItext of corse.

Leave it up to me to complcate a simple matter.

Thanks though mate. Take a vote.