Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Troubles with animations on android mobile device / emulator #41

Open
shegal opened this issue Nov 4, 2024 · 1 comment
Open

Troubles with animations on android mobile device / emulator #41

shegal opened this issue Nov 4, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@shegal
Copy link

shegal commented Nov 4, 2024

I have code like this:

_viewer = Flutter3DViewer(
        enableTouch: false,
        progressBarColor: Colors.transparent,
        onLoad: (String modelAddress) {
          _controller.setCameraOrbit(-30, 90, 75);
          _controller.playAnimation(animationName: 'idle');
        },
        controller: _controller,
        src: 'assets/models/character.glb');

It works on web platform (after model is loaded 'idle' animation starts playing), but on android mobile device (emulator and real device both) it doesn't work (model stays in t-pose until screen is refreshed somehow, but camera orbit is set correctly).

Previously I have experienced some issues like that because of lags on mobile device so doing some small delay between setting camera orbit and playing animation was fixing the situation, but this time delay trick didn't work out, so problem is probably somewhere deeper.

@m-r-davari
Copy link
Owner

Hi @shegal ,
Thanks for reporting this,
For now please put 500-1000 milliseconds delay before you do your logic in onLoad callback.

I will fix it in next version

@m-r-davari m-r-davari self-assigned this Nov 5, 2024
@m-r-davari m-r-davari added the bug Something isn't working label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants