How do I adjust actors X and Y position away from edge of Scene?
I have a scene that is 800 pixels wide. I have the camera set in the middle of the scene with about 120 pixels on each side of the boundary of the camera. When I test my signed apk for Android my stationary actors are on the edge of the screen. When I preview with the creator they are in the correct position which is about 25 pixels from the left edge of the screen. Any help would be appreciated.
Best Answer
-
marc_greiff Posts: 250
Under project info, what platform do you have selected? and when in the viewer, are you using stretch, overscan or letter box?
I'll assume for the moment that youre using iphone landscape under project info, and overscan in your view/adhoc build. If this (or something similar to this) is the case, then gamesalad is essentially "zooming-in" the scene when viewed on your android device.
This is because the iphone landscape setting, in this case, sets game.displaySize.width to 568, and game.displaySize.height to 320. This is the display size of the actual iphone 5 device. However, the android device that you are testing on has a different display size and aspect ratio and therefor the position of the left and right edges of the iphone 5 screen are different than that of your android device. So, in short, when your actor is 25 pixels from the left edge of the screen, it is 25 pixels from the left edge of the iphone 5's physical screen, and not your android device.
So how do you fix it? well there are a number of different ways on the forum but unfortunately, none of them are perfect for every device and every game. What I like to do is to set my project to overscan (which will zoom to the middle of the screen, filling all edges) then create conditions based on the three most common aspect ratios (1.78,1.5,1.33), and add those conditions to actors that need compensation, ie actors that are based off of the edges of the screen.
Answers
Can you provide an example of a condition that you would add to an actor based off the edge of the screen? I switched to Overscan as you suggested and yes I am using iPhone5 landscape. Attached is a screenshot of my main game scene. As you can see I have some actors on the left edge that will be stationary. I can't seem to create the proper conditions to align the actors properly. Thank you for the initial reply @marcgreiff
Here is the screenshot for what its worth.