4
\$\begingroup\$

I have a pseudo-game which I'm developing in 9:16, to be displayed in vertical screens. The client now needs another version in 16:9, rotated in 90º.

I tried creating a empty object, puting all my elements inside it, and rotating, but it caused a lot of positioning bugs, probably because of localPosition x position.

Any help is apreciated.

Below in what in have x what I need

enter image description here

\$\endgroup\$
  • \$\begingroup\$ Desktop or mobile? \$\endgroup\$ – Evorlor Jun 12 '18 at 17:16
  • \$\begingroup\$ @Evorlor, Desktop \$\endgroup\$ – Marcelo Assis Jun 13 '18 at 14:36
  • 1
    \$\begingroup\$ Then your approach should work. Make sure you are moving everything with a null parent to be parented by your new GameObject. Make sure the GameObject's position is (0, 0, 0). Then rotate it by 90 degrees. Check to be sure you are not changing the parenting of the children afterwards. \$\endgroup\$ – Evorlor Jun 13 '18 at 14:41
  • 3
    \$\begingroup\$ Why not just rotate the camera? \$\endgroup\$ – Philipp Aug 14 '18 at 10:22
  • \$\begingroup\$ you can rotate camera or just set screen.orientation \$\endgroup\$ – virtouso Aug 23 '19 at 0:52
0
\$\begingroup\$

Create a mapping between the position in the vertical screen to that in the horizontal one, so that you reposition all elements according to this mathematical mapping. i.e. : loop through all elements and apply the mapping to each one.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.