Open tansangxtt opened 5 years ago
Hi @tansangxtt,
Sorry for the delayed response, it looks like you're running multiple Viro3DSceneNavigators at the same time. This isn't really a supported use case and may lead to undefined behaviors like what you observe. To mitigate the issue, you can consider using a static image in the side view rather than a 2nd Viro3DSceneNavigator.
Thanks,
Hi @tansangxtt,
Sorry for the delayed response, it looks like you're running multiple Viro3DSceneNavigators at the same time. This isn't really a supported use case and may lead to undefined behaviors like what you observe. To mitigate the issue, you can consider using a static image in the side view rather than a 2nd Viro3DSceneNavigator.
Thanks,
Thanks @achuvm for your reply
First, if I use only 1 Viro3DSceneNavigator, I have to do the navigation manually and not sure it works properly. Basically, I want to put the animated 3D model in 3 separated scenes. As I understand your ideal, I need to show/unshow the 3D model? One more related issue, there is an AR scene and ViroARSceneNavigator is used as well. After goback() from here, the animation also is stopped Do you have any advise, recommendation for this situation? Thank you
Hi @achuvm, after many tries, I found that Viro3DSceneNavigator cannot be used more than one time although I used it in the different components. Because it is necessary and natural to show the 3D model in different scenes (react-native UI)
Could it be a bug or limitation?
Environment
Please provide the following information about your environment:
Description
First of all, I just focus on Android and have tested to run it on Samsung Galaxy S7. I use React-Navigation for navigating. In my app, I have this StackNavigator:
At Home scene and Profile scene, I add Viro3DSceneNavigator for showing a multipart animated 3D models. According to Viro document, I need to set initialScene.
For Home scene,
For Profile scene,
My app flow is:
And "Back" button is implemented: navigate.goBack()
My issue: Animation is stopped when nagivate.goBack()
I checked a lot of documents and issues related to Viro3DSceneNavigator but I haven't found any solution. Also, I added "Feed" button in the Home Scene to call setState in order to re-render Viro3DObjects but nothing changed
Reproducible Demo
At Home scene, the animation work well. If I navigate to Profile and go back from there, the animation (Home scene) will be stopped. However, If I go back to the "Login" scene and click "Next" to "Home" scene, the animation (at Home scene) work normally again