This is my goal: I'm trying to get health bars to show up in the right place.
What I have:
1 Main Camera used for the world. It's a perspective cam that can be dragged around.
1 UI Camera, ortho, child of UI Root
UI Root Is setup with Automatic on, Manual/minimum/maximum height to 768
What I'm doing: I'm using the main camera "WorldToScreenPoint" to find out the health bar screen coords. Then I create a child health bar, parent it to a panel that is anchored to the top left of my UI and positioning it using the Vector3 I get back from WorldToScreenPoint.
It works fine on an iPad 2/Mini but when you go to an iPad 4 with the higher resolution, that calculation is off and the bar shows up in the wrong place.
Now, I can take the screen resolution of the main cam, figure out the percentages in X and Y and translate that to the UI cam... but it seems like there should be a better way.
Is there a better way?
Thanks in advance.