playMaker

Author Topic: GUI Texture dynamic placement?  (Read 2116 times)

KozTheBoss

  • Full Member
  • ***
  • Posts: 150
  • You dont fail unless you give up trying to succeed
    • Pixel Life - portfolio
GUI Texture dynamic placement?
« on: April 08, 2013, 03:33:57 AM »
Hey guys, so im working on my graduation project on my 2nd week right now, and im trying to have my GUI texture (used for my healthbar) always be at 20% of screen height from the bottom of the screen - is there any way to do that? right now i can only set its height and width indent in pixels from the edge of the screen, so when you play the game at a different resolution than in the editor window, the healthbar moves to a different location =(

help?
Remember, you don't fail unless you give up trying to succeed!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: GUI Texture dynamic placement?
« Reply #1 on: April 09, 2013, 02:15:50 AM »
Hi,

 Yes, you set the transform position to 0.5,0.2,0 and then you move the actual pixel insets, and then you get free anchoring :)

Bye,

 Jean

KozTheBoss

  • Full Member
  • ***
  • Posts: 150
  • You dont fail unless you give up trying to succeed
    • Pixel Life - portfolio
Re: GUI Texture dynamic placement?
« Reply #2 on: April 11, 2013, 03:12:50 AM »
Hi Jean, that sounds amazing!

I will try it out in a few hours :) will report back if it worked or not

Thanks

Koz
Remember, you don't fail unless you give up trying to succeed!