- Home /
Camera moving in Unity3d Editor, but not on Android device
In a 2D game I'm creating with Unity3D, at one point the camera moves from one point to another while slowly zooming out (orthographicView increases), to move the player from one location to another on the world map (sort of like a cut-scene between levels).
Everything works just fine when I test / play the game in the Unity Editor, but when I export it for Android, upload it to Google Play, and test it on my Android Device, the camera does not move and it doesn't zoom out (everything just remains stationary). Everything else in the game seems to work fine on the Android Device.
I've include my code below for reference.
Any ideas what I'm going wrong? I've been browsing the Q&A Forum, but can't seem to find anyone with a similar issue.
Please let me know if you need more information. Thanks all!
if(cameraMoved == false)
{
if(cam.transform.position.x < cameraEndPos.x)
{
cam.transform.position = new Vector2(newXPosEachFrame, newYPosEachFrame);
orthoSize += camPerFrameZoomChange;
cam.orthographicSize = orthoSize;
}
else
{
cam.transform.position = new Vector2(cameraEndPos.x, cameraEndPos.y);
cameraMoved = true;
}
}
Your answer
Follow this Question
Related Questions
Changing master view move speed. 3 Answers
Unity 5.6 Google Cardboard Camera Movement Issue 3 Answers
ProGrids overriding Unity controls 0 Answers