react-native-arkit icon indicating copy to clipboard operation
react-native-arkit copied to clipboard

Error trying to use Group

Open elaughli opened this issue 7 years ago • 2 comments

I'm trying to add a Group containing some objects just like in the README, but I keep getting this error:

img_0027

Line 436 in ARView.js is

<ARKit.Group opacity={0.5} position={position} eulerAngles={eulerAngles}>

I've trying simplifying the example to use something like

<ARKit.Group>
  <ARKit.Cylinder
     position={{ x: 0.4, y: 0, z: 0 }}
     shape={{ radius: 0.05, height: 0.1 }}
   />
  <ARKit.Cylinder
     position={{ x: -0.4, y: 0, z: 0 }}
     shape={{ radius: 0.05, height: 0.1 }}
   />
</ARKit.Group>

but with the same error where using ARKit.Group

All other node types (that i've tested) work individually.

I'm using version 0.9.0, and I confirmed in my node_modules that all the ARGroup related files match those on the repo. I'm guessing it's user error at this point since #45 implies that it's been working for others, so if someone could point me in the right direction I'd appreciate it.

elaughli avatar Mar 20 '18 22:03 elaughli

@elaughli I think you need React 16.1, because we use the <Fragment /> for it. Check which version of react you are using.

macrozone avatar Mar 30 '18 12:03 macrozone

The react version I'm using is 16.3.1, so I guess that isn't the issue. At least not for that reason.

elaughli avatar Apr 12 '18 17:04 elaughli