ReactVision / viro

ViroReact: The AR and VR library for React Native 📳💙💛🤍💚
MIT License
1.42k stars 166 forks source link

App crash on android when I use ViroARCamera #65

Open saeedtkh opened 2 years ago

saeedtkh commented 2 years ago

@doranteseduardo : Thanks for your effort to make thins nice component. However, I have the following problem.

Environment

Please provide the following information about your environment:

  1. Development OS: Mac

  2. Device OS & Version: What Android OS 10, android

  3. Version: ViroReact version: "@viro-community/react-viro": "^2.20.2", and React Native version: "react-native": "0.65.1"

  4. Device(s): Samsung

Description

When I use any ViroARCamera in the scene the app crashes on android!

my code>

<ViroARScene onTrackingUpdated={onInitialized}>
      <ViroAmbientLight color={"#aaaaaa"} />

      <ViroSpotLight innerAngle={5} outerAngle={90} direction={[0,-1,-.2]}
          position={[0, 3, 1]} color="#ffffff" castsShadow={true} />

      <ViroARCamera>
                <Viro3DObject
            source={require('./models/rodeh.obj')}
             resources={[require('./models/rodeh_material.mtl')]}
              scale={[0.02, 0.02, 0.02]}
            //position={[-1, -2, -1]}
            position={[0, 0, 0]} // <- try changing these values

            type="OBJ" />
         </ViroARCamera>

    </ViroARScene>
doranteseduardo commented 2 years ago

Can you please attach a screenshot of the error message?