Skip to content

Crash when render 3d object GLB #130

@duyta7598

Description

@duyta7598

Requirements:

Please go through this checklist before opening a new issue

Environment

Please provide the following information about your environment:

  1. Development OS: Mac
  2. Device OS & Version: Android 12
  3. Version: ViroReact: 2.22.0 and React Native version 0.63.4
  4. Device(s): Pixel 4

Description

Viro React made crash when render GLB file, It only happen in some of GLB file. And when I check logcat in Android Studio, it show this error
Failed to create an anchored node at position [0.0, 0.0, 0.0]

This is some off my code

    <ViroNode>
      <ViroSpotLight
        innerAngle={5}
        outerAngle={45}
        direction={[0, -1, -0.2]}
        position={[0, 3, 0]}
        color="#ffffff"
        castsShadow={true}
        influenceBitMask={2}
        shadowMapSize={2048}
        shadowNearZ={2}
        shadowFarZ={5}
        shadowOpacity={0.7}
      />
      <Viro3DObject
        source={require("./pet.glb")}
        position={randomPosition}
        scale={[0.02, 0.02, 0.02]}
        type="GLB"
        lightReceivingBitMask={3}
        shadowCastingBitMask={2}
      />
      <ViroQuad
        rotation={[-90, 0, 0]}
        width={0.5}
        height={0.5}
        arShadowReceiver={true}
        lightReceivingBitMask={2}
      />
    </ViroNode>

Remove ViroNode doesn't seem to help, I believe it only happen with some off my glb 3d object
Can any one help me with this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    NAbugSomething isn't workingmore info requestedFurther information is requested to help diagnose the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions