react-native-ar / react-native-arkit

React Native binding for iOS ARKit
MIT License
1.72k stars 143 forks source link

Error trying to use Group #175

Open elaughli opened 6 years ago

elaughli commented 6 years ago

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.

macrozone commented 6 years ago

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

elaughli commented 6 years ago

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