Please provide the following information about your environment:
Development OS: macOS Mojave
Device OS & Version: iOS 13.1.3
Version: react-viro version 2.17.0, react-native 0.59.9
Device(s): iPhone 7 and 2017 iPad
Description
I created an onClick function for a 3d object, however this function only works whenever I am in close distance to the object. Even if the object is very visible, if I am not right next to the object the onClick function does not work. I've tried this on both an iPhone 7 as well as a newer iPad and they both encounter the same issue. This issue has also come up when I've experimented with other 3d models.
^The onClick does not work from this distance
^However it does work from this distance
Reproducible Demo
'use strict';
import React, { Component } from 'react';
import {StyleSheet, Alert} from 'react-native';
import {
ViroARScene,
ViroARImageMarker,
ViroARTrackingTargets,
Viro3DObject,
ViroMaterials,
} from 'react-viro';
export default class HelloWorldSceneAR extends Component {
I'm having the same issue; it seems related to https://github.com/viromedia/viro/issues/785, because if I swipe on the object when it's far away, then the onClick fires. Did you make any progress with it?
Environment
Please provide the following information about your environment:
Description
I created an onClick function for a 3d object, however this function only works whenever I am in close distance to the object. Even if the object is very visible, if I am not right next to the object the onClick function does not work. I've tried this on both an iPhone 7 as well as a newer iPad and they both encounter the same issue. This issue has also come up when I've experimented with other 3d models. ^The onClick does not work from this distance
^However it does work from this distance
Reproducible Demo
'use strict';
import React, { Component } from 'react';
import {StyleSheet, Alert} from 'react-native';
import { ViroARScene, ViroARImageMarker, ViroARTrackingTargets, Viro3DObject, ViroMaterials, } from 'react-viro';
export default class HelloWorldSceneAR extends Component {
constructor() { super(); this.onClick = this.onClick.bind(this); }
onClick() { Alert.alert("We just Clicked the image!"); }
render() { return (
} }
ViroMaterials.createMaterials({ herodog: { diffuseTexture: require('./res/Herodog_UV-0.jpg'), }, });
ViroARTrackingTargets.createTargets({ "targetOne" : { source : require('./res/Test2.jpg'), orientation : "Up", physicalWidth : 1 // real world width in meters }, })
module.exports = HelloWorldSceneAR;