From 1a937f289381a7693c78bc36bff3f267d3dd0af9 Mon Sep 17 00:00:00 2001 From: Oleksandr Leuschenko Date: Thu, 7 Jan 2021 11:57:52 +0200 Subject: [PATCH] Optimize onCameraEulerAngles method --- ios/Classes/FlutterArkitView+Handlers.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ios/Classes/FlutterArkitView+Handlers.swift b/ios/Classes/FlutterArkitView+Handlers.swift index c423dfd..a3a4db7 100644 --- a/ios/Classes/FlutterArkitView+Handlers.swift +++ b/ios/Classes/FlutterArkitView+Handlers.swift @@ -218,9 +218,7 @@ extension FlutterArkitView { func onCameraEulerAngles(_ result:FlutterResult){ if let frame = sceneView.session.currentFrame { - let cameraEulerAngles = frame.camera.eulerAngles - var eulerAnglesVector = SCNVector3(cameraEulerAngles.x, cameraEulerAngles.y, cameraEulerAngles.z) - let res = serializeVector(eulerAnglesVector) + let res = serializeArray(frame.camera.eulerAngles) result(res) } else { result(nil)