Forum rules - please read before posting.

[Bug Report] Menu positioning with force aspect ratio

edited March 2017 in Engine development
If a menu is positioned over speaking character, it has some positioning problems when using "Force Aspect Ratio" setting (even worse if the camera is constrained on X). The same bug exists with Unity UI menus and Adventure creator ones. I am using v.1.56

As you can see, if the player is on the right of the screen, the subtitles menu is misplaced. I am using a forced ratio of 1.77777777778 (which is 16:9). In the screenshots I am using a Canvas + Panel + Button to create the menu.

image 1: 16/9 aspect ratio - player in the middle of the screen - camera X constrained -> positioning OK

image

image 2: 16/9 aspect ratio - player in the right of the screen - camera X constrained -> positioning OK

image

image 3: 21/9 aspect ratio - player in the center of the screen - camera X constrained -> positioning NOT OK (a bit shifted on the right) 

image

image 4: 21/9 aspect ratio - player in the right of the screen - camera X constrained -> positioning NOT OK (shifted on the right)
image

Unconstraining the camera seems to partially fix the issue (it's still misplaced anyway), here is a 21:9 screen to show it:
image


Here are my canvas, panel button and menu settings

image

Canvas prefab can be downloaded here:

possible functions causing the issue:
Char.cs -> public Vector2 GetScreenCentre ()
Menu.cs -> public void SetCentre () (even if the code one seems to take care of the aspect ratio, at least in AC case)

I'm not really sure.. seems like the Engine is not considering the pillarbox width somehow. 

Comments

  • Thank you for the detailed explanation and clear steps, @tehpirat3!  I shall go through them and let you know if I need more information.
  • my pleasure, let me know if you need more details or if you need a (private) link for the entire project!

  • No, it's fine.  Consider it fixed for v1.56b.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.