Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Andys on March 27, 2013, 05:15:05 AM

Title: GUITexture Position
Post by: Andys on March 27, 2013, 05:15:05 AM
Is there a way to fix a GUI Texture position on the screen, because when i re-size the screen it moves left or right and outside of the Gui box which doesn't move.

The GUi texture sits on another and is being used for a health bar, so they need to stay aligned.

Or is there a better way of doing this?
Title: Re: GUITexture Position
Post by: jeanfabre on March 27, 2013, 08:03:09 AM
Hi,

 Yes. use the inset position, make the transform position to 0,0 or 0,1 or else ( to stick to corners of the screen if screen size changes.

 then uset he pixel inset position, then you will get absolute positionning.

 BUT, I strongly recommand you get a proper 2d framework do this... it will save you a  lot of time and frustration down the road :)

Inset position can be set using this custom action:

http://hutonggames.com/playmakerforum/index.php?topic=776.msg3127#msg3127


bye,

 Jean
Title: Re: GUITexture Position
Post by: Andys on March 27, 2013, 08:15:32 AM
Thanks for the reply, will give it a go.

Can you recomend a 2d framework?
Title: Re: GUITexture Position
Post by: jeanfabre on March 27, 2013, 08:51:03 AM
Hi,

 nGui seems very popular, and it's ok to work with, 2d toolkit is very good, but more for 2d animations than interactive ui.

grab a free version of ngui and give a it go and see how it goes.

bye,

 Jean