CCViewResolutionPolicy FixedWidth doesn't work well in 1.7.1

AlexSAlexS USUniversity ✭✭

Hi!
I have a game in the store, using CocosSharp 1.6.2 (http://drmtm.us/luau)
I am using following code (with 1.6)
float desiredWidth = 320; float desiredHeight = 480; CCScene.SetDefaultDesignResolution(desiredWidth, desiredHeight, CCSceneResolutionPolicy.FixedWidth);

Everything works as expected.

When I migrate to 1.7.1, I transform code from above to
var desiredWidth = 320; var desiredHeight = 480; gameView.DesignResolution = new CCSizeI(desiredWidth, desiredHeight); gameView.ResolutionPolicy = CCViewResolutionPolicy.FixedWidth;

Pretty straightforward. However, the output is that game looks stretched vertically (doesn't respect ratio)
https://www.dropbox.com/s/pk490lwh0a2vfx5/Screenshot 2016-05-03 05.39.36.png?dl=0

According to these docs (https://developer.xamarin.com/guides/cross-platform/game_development/cocossharp/resolutions/), it should not be that way. Already published version with CocosSharp 1.6 doesn't exhibit this problem either.

Please advise

Posts

  • AlexSAlexS USUniversity ✭✭

    Found out that restarting the scene (have button Restart) fixes the glitch.
    Also, same node used in the board (middle of the screen) and at the bottom (right bottom corner) shows problem in the board and doesn't show problem at the bottom.
    Weird.

  • AlexSAlexS USUniversity ✭✭

    Anyone?

  • ThomasEveringhamThomasEveringham USMember ✭✭

    Same problem

Sign In or Register to comment.