viromedia/viro

Viro3DObject moving with camera instead of staying static

waqaskhanroghani opened this issue ยท 4 comments

<Viro3DObject
source={ModelObjects[selectedAlphabet][currentObject].obj}
// source={require('../../assets/objects/apple.obj')}
position={ModelObjects[selectedAlphabet][currentObject].position}
scale={[0.2, 0.2, 0.2]}
rotation={[5, 5, 55]}
materials={['orange']}
// fixedToCamera={true}

        type="OBJ"
        // type="VRX"
        onClick={() => {
          console.log('click');
          {
            missionComplete();
          }
        }}
      />

We experienced this same issue.

I find some solution for that :-
1: First convert your OBJ file FBX or export you 3d object in FBX extension.
2: Then convert your FBX file to VRX which the help of this viro lib : https://github.com/ViroCommunity/ViroFBX .
3: Use the VRX file in your app.
I hope that solve your Issue.

Did not solve the issue, broke 3d model and broken model is moving with the camera.

Did not solve the issue, broke 3d model and broken model is moving with the camera.

use Vrx objects instated of FBX or OBJ.