Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: IIKII on October 31, 2016, 09:50:33 AM
-
Hi, I am trying to make a UI image to stay directly on a gameobject in the scene. For example the enemy health bar image above the enemy object.
I can successfully do it using GUI texture but not with Canvas > image. The World to Screen doesn't work. I also tried using Rect transform world to screen but failed too.
Anyone has clear steps to making it work?
Thanks
-
Hi,
There is a sample showing how to do this on the Ecosystem:
(http://i.imgur.com/J5O0L5W.png)
Bye,
Jean
-
Hi thank you that's explains.
But i realized that there's a weird problem of the ugui text appearing in the opposite spot of the gameobject when i turn the camera around. This problem is also with using the normal gui.
Any solution to this?
-
Hi,
yes. I know about this issue. check using GameObjectIsVisible or IsVisibleInCameraFrustrum ( from the Ecosystem).
Be careful, the sceneView in editor counts as a camera so is Visible will be true even if not in the game View but in the SceneView.
Bye,
Jean