Camera view shifts when unpaused (universal binary)

tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
I'm admittedly new to working with universal binaries, but the detect screen size + change camera height and origin technique seems to work great for an iPad to iPhone setup with universal binaries. Where I'm having trouble is when I pause the game and then unpause it. The initial gameplay scene looks fine on an iPhone, as does the pause scene. But after unpausing (via an Unpause Game behavior), the gameplay scene is shifted down about 20 pixels and partially offscreen. This happens with multiple scenes but I switch scenes after unpausing and then switch back, the gameplay scenes look fine. It's just immediately after unpausing.

Any ideas what's going on?

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    It's bug in the pause behavior. There's always b even an issue the jacks up the camera origins. A way to workaround this is to put a constrain behavior just before the pause behavior to constrain all the cam adjustments. This ussually solves the problem for me.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited April 2013
    That fixed it, thank you @tenrdrmer! How annoying. And now that it's "fixed" it has a noticeable jump as scene.Camera.Origin.Y resets. I figured out that it's setting scene.Camera.Origin.Y to 0, but I need it to be -46.
  • ElfizmElfizm Member Posts: 489
    Just note it down that that's what you have done, because once GS fixes the bug, whenever that may be, it could as shown in latest version break your code. However using constrain is very unlikely but that way when you look back you can fix it up and get rid of those constrains.

    That's what I do when I find a work around for a known bug. And it helps in the long run.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Yeah if you have a transparent or translucent pause scene you can actually see that it resets the origin as soon as it pauses. Annoying indeed. Hopefully @codewizard has this on his list of todo's
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Hopefully this is one of the simple adjustments that @CodeWizard has as its rather annoying
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    I don't use the pause behavior but notice the same thing when rotating the device. Again, a constrain 'fixes' it but you notice a jump in the object positions. So looks kinda glitchy.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Yes I can't use pause in puck it because it screws up multitouch too. I tried everything but no luck. They have to address pause as we need that.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @FryingBaconStudios How does it affect multi-touch?
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    When I come back from pause my touch I actor want's to keep resetting to 0x 0y when I touch it. Doesn't happen to touch 2. I've tried everything drag attribute, zero timer and even rebuilt the actor and code Incase of some corruption but no luck.
  • richiconrichicon Member, PRO Posts: 55
    edited June 2013
    Bump! I have run into this issue too - very frustrating.

    Any news on a fix?
  • richiconrichicon Member, PRO Posts: 55
    This was a GS bug and happy to say now fixed in the nightly build.
Sign In or Register to comment.