Camera off position when I lock and unlock phone's screen

3absh3absh Member Posts: 601
edited December 2015 in Working with GS (Mac)

I'm not sure if this is a coding problem (it shouldn't be).
I have a scene that's 4 times the size of the camera location (the white box).
When I lock then unlock the phone's screen the camera is in a different position inside the scene.
I don't know why this happens, I'm guessing there's some sort of resetting involved after unlocking the screen, I'm pretty sure this isn't due to my coding, but rather a fault in the SDK.
Come one GS, please fix this ASAP, I love your layout and simplicity but seriously guys, these things should never ever happen.
Especially that you've been in the business for quite a while now.

This is what my game looks like after I unlock my phone :(

Comments

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited December 2015

    Are you using custom camera offset? Show the code for how you're changing the camera.

  • AlchimiaStudiosAlchimiaStudios Member Posts: 1,069

    Most SDK's have bugs man. Unity 5.3 just released. Take a look at the full release notes sometime. it's like 100+ bugs fixed. That means in 5.1+ they accumulated had over 100+ bugs with the engine in a stable release. Software+bugs is just a thing that happens. Even the cleanest code ever written has bugs in it. Every project and device is different, things don't always work as expected.

    The point is, these things DO happen, and it's your job as a developer to try and figure it out wether it's your fault in your code or an actual engine issue.

    I can safely say I don't have this issue, and have never seen this issue and use very complicated camera logic in a retina project.

    We'll need to see your camera code before we can even try to help, a project file is even better.

    Follow us: Twitter - Website

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    Also when was the last time you updated your android sdk?

  • 3absh3absh Member Posts: 601

    Are you using custom camera offset? Show the code for how you're changing the camera.

    this is my code

    Basically I have 2 regions of the scene that I switch back and forth to, one is when GameOver is true and one when Gameover is false.
    The title screen and the score screen are basically when Gameover is true which are on the right side (x=568)

  • 3absh3absh Member Posts: 601

    IT would really help if we knew what exactly gets reset in the game after locking and unlocking the phone screen

  • AlchimiaStudiosAlchimiaStudios Member Posts: 1,069
    edited December 2015

    Does the y ever change (even if it's following an actor through control camera or something similar)?

    Is this screen from a nexus 5?

    Have you tried other devices?

    Follow us: Twitter - Website

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    Seems like something is getting stuck between. Try using constrains instead of changes. That way if you back out and the rule fired but didn't complete the change, as changes only fire once when a rule activate, the constrain will still be active.

  • 3absh3absh Member Posts: 601

    Does the y ever change

    The Y doesn't change, but not that you've mentioned it I'm thinking of restraining the Y to a certain altitude, maybe that will solve the problem

    Is this screen from a nexus 5?

    It's from a Nexus 7

    Have you tried other devices?

    I tried all my 3 Android devices, same issue

  • 3absh3absh Member Posts: 601

    Try using constrains instead of changes.

    I constrained the camera y position to 320, waiting for the preview on my phone to see if it's fixed.

  • 3absh3absh Member Posts: 601

    After constraining the Y position I still get a dislocated camera position. This time it's dislocated in the x axis :/
    I'm gonna try 'constrain camera x' instead of change

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    Are you using the latest build? I just read @Hopscotch found some issues with rules not firing properly. This may be your issue. He was submiting a test build for GS team.

  • 3absh3absh Member Posts: 601

    Wow, six months and still not fixed by GS team? Tsk tsk

    Thanks for the link

  • 3absh3absh Member Posts: 601

    @Lost_Oasis_Games said:
    Are you using the latest build?

    My last GS update was about 7 hours or so
    Just before I started this thread

  • BlackCloakGSBlackCloakGS Member, PRO Posts: 2,250

    @izam is there a bug number for the bug in your forum post?

  • 3absh3absh Member Posts: 601

    I also notice when the game boots up the GameSalad logo goes in a weird location when I rotate the phone to landscape mode, @BlackCloakGS please look into this, these are really minor bugs we're talking about they shouldn't be too complicated to fix.

  • SocksSocks London, UK.Member Posts: 12,822

    @abuabed84 said:
    . . . . please look into this, these are really minor bugs we're talking about they shouldn't be too complicated to fix.

    All they have to do is change an RGB value ! :p :)

  • 3absh3absh Member Posts: 601

    I fixed the bug B)
    simply used "constrain while game over is false" instead of change, shout out to @Lost_Oasis_Games , thank for the tip
    I'm still waiting for the GS update that resolves the GS logo positioning when I start the game.
    I want my game to be perfect

  • BlackCloakGSBlackCloakGS Member, PRO Posts: 2,250

    What is the bug number for the logo positioning bug?

  • 3absh3absh Member Posts: 601

    @BlackCloakGS said:
    What is the bug number for the logo positioning bug?

    I haven't reported it yet

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    No problem. It's really just a matter of understands how the behaviors and rules work in GS. It's all just conditional logic but you must understand the conditions and what exactly each thing can and can't do.

Sign In or Register to comment.