- Home /
Question by
robbiek · Jan 12, 2012 at 11:17 PM ·
screenalignscreen.height
Ligning up a health bar.
,I'm trying to get a health bar to line up excatly on the bottom of my screen. As they normally do, but I'm trying to get it in a way so it does that for any person (because people have different screen sizes) I've tried doing it like Screen.height / 2 and many different ways but that lines it up towards the middle which is no help at all.
Comment
Answer by kalvinlyle · Jan 13, 2012 at 02:46 AM
I believe the top left corner of the screen is (0,0) the bottom right is (screen.width, screen.height).
You want to use screen.height for the y position but offset it by the size of your health bar so that it appears in the correct spot.