Camera off position when I lock and unlock phone's screen
3absh
Member Posts: 601
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
Are you using custom camera offset? Show the code for how you're changing the camera.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
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
Also when was the last time you updated your android sdk?
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
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)
IT would really help if we knew what exactly gets reset in the game after locking and unlocking the phone screen
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
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.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
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
It's from a Nexus 7
I tried all my 3 Android devices, same issue
I constrained the camera y position to 320, waiting for the preview on my phone to see if it's fixed.
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
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.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
This might help.
http://forums.gamesalad.com/discussion/comment/562180#Comment_562180
All my games on Google Play
Wow, six months and still not fixed by GS team? Tsk tsk
Thanks for the link
My last GS update was about 7 hours or so
Just before I started this thread
@izam is there a bug number for the bug in your forum post?
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.
All they have to do is change an RGB value !
I fixed the bug
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
What is the bug number for the logo positioning bug?
I haven't reported it yet
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.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS