Manual camera animation - lagging issues


I have a mobile game i’m working on where i have created a cool 3D environment thanks to your great editor, well done Playcanvas team for that !

Video example of the gameplay, not a rendering issue.

The issue i have is lagging rendering on mobile devices after some times. May be it is due to my implementation of custom rendering.

Before starting the launch, i have calculated the path with some math algorithm, and i put the main Playcanvas application in autorender = false;
When the launch start, i update every frame, using requestanimationframe the position of the coin and the camera, and call renderNextFrame = true;
All of that is done in an Angular application, using Playcanvas APIs.

Am i doing something wrong ?

Thanks for your time

Hi @vogloblinsky,

That’s interesting, that it happens only on mobile and after some time. Do you have a build link that can we test to see the kind of lagging?

In the meantime, have you tried instead of updating the renderer like that, to set autoRender to true when the launch starts and disable it on the PlayCanvas side when it finishes?

1 Like