Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
well.. I have create an interface for my project in CC6. There are 4 arrows (right, left, up, down), on pc is ok, on smartphone orizontally mode is ok, but in smartphone vertical mode the arrows are too little. There is a possibility by script to change dimension of these with the resolution of the device? Example, if this is orizontally or vertically? |
||||
|
@misterpaint instead of using a 2Doverlays try using a 2Dimput then set it as a keypress emulator. That should work is to try. |
||||
|
@pmax, I don't think the op has an issue with triggering of click events of overlays, so maybe key emulation is not what he wants.. @misterpaint, well, I am not sure if you are using native android export or the webGL one. But if you are using the webGL one then yeah you can resize the overlays and can also adjust their positions. also id you are using 2D touch input then it won't work as 2D touch input doesn't work properly on the basis of scale and alignment on webGL platform. you can get the device orientation and based on the orientation you can change the scale of the overlays. |
||||
|
@just_in_case I suggested using 2Dinput because I noticed it has the "Maintain proportions" command, I don't know maybe that's what they need to solve the problem? |
||||
|
@pmax, yeah general 2D overlays also have that "keep aspect ratio" command as well, but that works to keep the image texture in the aspect ratio and won't affect the scale of the overlay or touch input. |
||||
|
@just_in_case thanks for the 'information. |
||||
|
or make interface / gui in rocketcake first and easyly test various layouts for your GUI for PC / Tablet / small and large phones then when happy export entire GUI as single image put that in your app and combine with 2d elements for info outputs and command interactivity that way 3 scenarios will fit game to any device if os windows and screen with > 800px = PC if os android then phone or tablet screenheight > screenwidth = phone portretmode |
||||
|
@Douwedabbe, I beleive you never tried that yourself, that will simply again put the op in the same situation and would just be waste of time.. cause in the end he has to use 2D overlays to put the image created from rocketcake or any other tool, that leads him to the same situation, because he is already using 2D overlays. it would be of much better if you try things first yourself and then post the answers, otherwise it will just waste time and make the original author frustrated. It wasted my time and I hope it won't waste time of the OP, because it doesn't work and simply put more effort and make the problem overcomplicated. if you don't know the solution then it's better not to provide those overcomplicated stuff that don't work at all. |
||||
|
If the game is in webGL then you can check the Orientation and based on the orientation you can change the scale of the overlays. Or you can create 2 instance of the overlays one with a small scale and one with large scale and then yous still need to check the orientation and then hide or unhide one instance if the overlays.. |
||||
|
I'm sorry for delay.. but I'm with covid... it's my 2nd time with covid... this variant is terrible :( I will read your answers calmly, thank you very much and see you soon.. I hope.. :D |
||||
|
that's terrible man, please take care of yourself and get well soon... |
|