ReactVision / viro

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

Viro3DObject: sometime does not respond to pinch and drag gesture #179

Open sbgiri opened 1 year ago

sbgiri commented 1 year ago

Hello Everyone

  1. Development OS: Mac
  2. iOS version (16.1) & Android Version : 9.0
  3. ViroReact version : 2.23.0 and React Native version : 0.66.2
  4. Device(s):iPhone 12 Pro, OPPO A31

Description

I have created an AR scene with ViroReact on both android and iOS. At starting everything works perfectly on scene but after using is for something all added 3D object on screen just stop responding to pinch and drag but rotation of object can be done.

<Viro3DObject source={modelItem.arUrl} type={modelItem.arType} materials={modelItem.arTexture ? modelItem.arTexture : 'pbr'} resources={modelItem.arResources} animation={{ ...modelItem.arAnimation, run: this.state.runAnimation, }} lightReceivingBitMask={this.props.bitMask | 1} shadowCastingBitMask={this.props.bitMask} onClickState={this._onClickState(this.props.modelIDProps.uuid)} onClick={() => { if (modelItem.item) { this.props.mediaStore.sound = null; this.props.mediaStore.media = modelItem.item; this.props.mediaStore.modalVideo = true; } }} onError={this._onError(this.props.modelIDProps.uuid)} onRotate={this._onRotate} onPinch={(pinchState, scaleFactor, source) => { console.log('---------', modelItem.arType); this._onPinch(pinchState, scaleFactor, source); }} onLoadStart={this._onObjectLoadStart(this.props.modelIDProps.uuid)} onLoadEnd={this._onObjectLoadEnd(this.props.modelIDProps.uuid)} />

Any help greatly appreciated.

ViktorVojtek commented 1 year ago

@sbgiri downgrade viro to 2.22.0 and issues with gesture events should gone or at least should improve in a way...

rajAmukhliS commented 2 months ago

I am also facing same issue.

I tried to get it fixed by using GestureHandlerRootViewof react-native-gesture-handler but got error of attempted to add a non component child of type

so what's solution for this Viro3DObject: sometime does not respond to pinch and drag gesture isuue.