i want to texture my detected AR plane with image rendered from firestore. i can add multiple images on plane horizontally with ontappointandplane method , but unable to texture image to plane with on detectedplane methods
Future _handleOnPlaneDetected(List<ArCoreHitTestResult> hits) async {
for (var hit in hits) {
await _addImage(hit);
}
}
Future _addImage(ArCoreHitTestResult hit) async {
final bytes =
(await rootBundle.load('assets/earth.jpg')).buffer.asUint8List();
final earth = ArCoreNode(
image: ArCoreImage(bytes: bytes, width: 500, height: 500),
position: hit.pose.translation + vector.Vector3(0.0, -0.1, 0.0),
rotation: vector.Vector4(1.0, 0.0, 0.0, -hit.pose.rotation[3]),
);
arCoreController?.addArCoreNodeWithAnchor(earth);
}