Camera with lag

+6 votes
asked Aug 25, 2019 by ljimenez29 (240 points)
Hi, I have an app in Unity with EasyAR 3.01. The app has 3 scenes.
Scene 1: Menu
Scene 2: Calculator
Scene 3: Augmented Reality.

Scene 1 of the Menu, has 2 buttons to load to Scene 2 or Scene 3.

All scenes work correctly, but I have a problem that is the following.

While on the Menu scene, I load the Augmented Reality Scene and it works perfectly, then return to the Menu and load the Calculator Scene and perform some mathematical operations, this also works correctly. But what happens, when I return to the Menu again and I want to reload the Augmented Reality Scene it loads but the camera slows down, when I move it looks like a delay or lag of the camera and so it stays with that slow movement, and it is not nice for user experience. So far I have only been able to solve it by blocking the phone screen and then unlocking by swipe. When I do that it seems that the camera restarts and the movement is much more fluid without any delay or lag.

But this happens only when I enter Scene 2 - Calculator and perform some mathematical operation, if I enter the scene and do not do any operation and return to the Augmented Reality scene the camera works correctly.

I have already reviewed the objects in Scene 2 and I see nothing strange. I understand that when you change the scene, the objects in that scene in Unity are destroyed. Even so I tried to code destroy them manually but the problem remains. It seems that something was being kept in memory that does not allow camera movement to be more fluid.

This problem only happens on the phone and I tried it on several phones. Now in the Unity Editor none of this happens and everything works correctly.


Please log in or register to answer this question.

Welcome to EasyAR SDK Q&A, where you can ask questions and receive answers from other members of the community.