getCameraPose method

Future<Matrix4?> getCameraPose()

Returns the camera pose in Matrix4 format with respect to the world coordinate system of the ARView

Implementation

Future<Matrix4?> getCameraPose() async {
  try {
    final serializedCameraPose =
        await _channel.invokeMethod<List<dynamic>>('getCameraPose', {});
    return MatrixConverter().fromJson(serializedCameraPose!);
  } catch (e) {
    print('Error caught: ' + e.toString());
    return null;
  }
}