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

Cannot create second 3d controller - it just duplicates first one #36

Closed
shegal opened this issue Oct 9, 2024 · 7 comments
Closed

Cannot create second 3d controller - it just duplicates first one #36

shegal opened this issue Oct 9, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@shegal
Copy link

shegal commented Oct 9, 2024

I have viewer with controller on the main screen and they work perfectly fine. But if I try to create second viewer in modal window (so first viewer still present on screen) with another controller it seems like both controllers are the same and control viewer on the main screen.

@m-r-davari m-r-davari added invalid This doesn't seem right question Further information is requested labels Oct 9, 2024
@m-r-davari
Copy link
Owner

You need to create separate controller for each model viewer, for example if you have 3 model viewer then you need to create 3 controller

@shegal
Copy link
Author

shegal commented Oct 10, 2024

Of course I do create separate controllers (can provide you with code example if it is necessary). Seems like there is something underhood the controller with shared state or something like that.

@m-r-davari
Copy link
Owner

Ok then send your code for further progress, because I can't see the issue you mentioned in my case

@m-r-davari m-r-davari reopened this Oct 11, 2024
@shegal
Copy link
Author

shegal commented Oct 11, 2024

It is just yours modified example. Take a note, that controller is attached to second model viewer but in fact it displays textures from first model viewer. If two controllers are created (viewer1 - controller1 and viewer2 - controller2, controller2 is attached to viewer1 also).

main.zip
image

@m-r-davari
Copy link
Owner

m-r-davari commented Oct 12, 2024

Hi again,
I checked your code, there is a bug with controller references.
Thanks a lot for reporting this issue and helping me improving this package.
I will fix this issue in next version as soon as possible.

@m-r-davari m-r-davari added bug Something isn't working and removed invalid This doesn't seem right question Further information is requested labels Oct 12, 2024
@m-r-davari m-r-davari self-assigned this Oct 12, 2024
@m-r-davari
Copy link
Owner

m-r-davari commented Oct 14, 2024

I have fixed this issue in v2.0.2. Please check out the latest version.
https://pub.dev/packages/flutter_3d_controller

Let me know if you find any other issues.

@m-r-davari m-r-davari pinned this issue Oct 14, 2024
@shegal
Copy link
Author

shegal commented Oct 15, 2024

Yes, now it is working! Thanks a lot!

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