I have recently started to code on SwiftUI with no knowledge or experience in Application programming. I have a simple eye gaze tracking app using this Framework: https://github.com/ukitomato/EyeTrackKit
Using the given examples i have this code running:
struct ContentView: View {
@ObservedObject var eyeTrackController: EyeTrackController = EyeTrackController(device: Device(type: .iPad), smoothingRange: 10, blinkThreshold: .infinity, isHidden: true)
var body: some View {
ZStack(alignment: .topLeading) {
eyeTrackController.view
Circle()
.fill(Color.blue.opacity(0.5))
.frame(width: 25, height: 25)
.position(x: eyeTrackController.eyeTrack.lookAtPoint.x, y: eyeTrackController.eyeTrack.lookAtPoint.y)
}.edgesIgnoringSafeArea(.all)
}
On launch while having the circle it barely moves, updating its position once every 3-5 seconds.
After rotating the device to landscape mode, then immediately rotating back to Portrait mode, the app seems to run perfectly fine, having no stutter and smooth transition between point to point.
Any idea what can cause this issue?
Thanks in advance!